* [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsbutil/, src/
@ 2021-10-22 7:21 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-10-22 7:21 UTC (permalink / raw
To: gentoo-commits
commit: 53ffbaeb24f6ee22a2dcd70fad29c86a4dd863c2
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 22 07:21:35 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 22 07:21:35 2021 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=53ffbaeb
Remove leftover generated Makefiles from the repo (sic!)
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
libsandbox/Makefile | 4 ----
libsbutil/Makefile | 4 ----
src/Makefile | 4 ----
3 files changed, 12 deletions(-)
diff --git a/libsandbox/Makefile b/libsandbox/Makefile
deleted file mode 100644
index 2db82ff..0000000
--- a/libsandbox/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# Helper for developers.
-all libsandbox libsandbox.la: libsandbox/libsandbox.la ;
-clean: ; rm -f *.o *.l[ao] .libs/*
-%: ; $(MAKE) -C .. $@
diff --git a/libsbutil/Makefile b/libsbutil/Makefile
deleted file mode 100644
index f5638c7..0000000
--- a/libsbutil/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# Helper for developers.
-all libsbutil libsbutil.la: libsbutil/libsbutil.la ;
-clean: ; rm -f *.o *.l[ao] .libs/*
-%: ; $(MAKE) -C .. $@
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 4b2bc35..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# Helper for developers.
-all sandbox: src/sandbox ;
-clean: ; rm -f *.o *.l[ao] .libs/* sandbox
-%: ; $(MAKE) -C .. $@
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsbutil/, src/
@ 2025-03-09 18:27 Mike Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2025-03-09 18:27 UTC (permalink / raw
To: gentoo-commits
commit: 703ec985801ed9e6886f8538cddc67a71e6cbda5
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 9 04:52:42 2025 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Mar 9 18:22:12 2025 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=703ec985
libsbutil: remove sb_close
The close(2) manpage advises us to NOT retry after it fails.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
libsandbox/libsandbox.c | 2 +-
libsbutil/sb_close.c | 20 --------------------
libsbutil/sb_write_fd.c | 2 +-
libsbutil/sbutil.h | 1 -
src/sandbox.c | 2 +-
5 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index 9233c6c..11c6a6c 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -178,7 +178,7 @@ static bool write_logfile(const char *logfile, const char *func, const char *pat
ret = true;
error:
- sb_close(logfd);
+ close(logfd);
return ret;
}
diff --git a/libsbutil/sb_close.c b/libsbutil/sb_close.c
index 5379197..5f7def7 100644
--- a/libsbutil/sb_close.c
+++ b/libsbutil/sb_close.c
@@ -10,26 +10,6 @@
#include "headers.h"
#include "sbutil.h"
-/* General purpose function to _reliably_ close a file
- *
- * Returns 0 if successful or negative number on error (and errno set)
- */
-
-int sb_close(int fd)
-{
- int res;
-
- do {
- res = close(fd);
- } while ((res < 0) && (EINTR == errno));
-
- /* Do not care about errors here */
- if (-1 != res)
- errno = 0;
-
- return res;
-}
-
/* Quickly close all the open fds (good for daemonization) */
void sb_close_all_fds(void)
{
diff --git a/libsbutil/sb_write_fd.c b/libsbutil/sb_write_fd.c
index fdcd34e..85eac13 100644
--- a/libsbutil/sb_write_fd.c
+++ b/libsbutil/sb_write_fd.c
@@ -35,6 +35,6 @@ int sb_copy_file_to_fd(const char *file, int ofd)
ret = 0;
error:
- sb_close(ifd);
+ close(ifd);
return ret;
}
diff --git a/libsbutil/sbutil.h b/libsbutil/sbutil.h
index 2be3ca5..d092868 100644
--- a/libsbutil/sbutil.h
+++ b/libsbutil/sbutil.h
@@ -107,7 +107,6 @@ extern const char sbio_fallback_path[];
int sb_open(const char *path, int flags, mode_t mode);
size_t sb_read(int fd, void *buf, size_t count);
size_t sb_write(int fd, const void *buf, size_t count);
-int sb_close(int fd);
void sb_close_all_fds(void);
int sb_copy_file_to_fd(const char *file, int ofd);
int sb_exists(int dirfd, const char *pathname, int flags);
diff --git a/src/sandbox.c b/src/sandbox.c
index 81c7ac9..4124e86 100644
--- a/src/sandbox.c
+++ b/src/sandbox.c
@@ -127,7 +127,7 @@ static void print_sandbox_log(char *sandbox_log)
break;
sb_eerror("\n%s", buffer);
}
- sb_close(sandbox_log_file);
+ close(sandbox_log_file);
sb_eerror("--------------------------------------------------------------------------------\n");
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-09 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 7:21 [gentoo-commits] proj/sandbox:master commit in: libsandbox/, libsbutil/, src/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2025-03-09 18:27 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox