commit: 45a390784ec6b349ce97b4b11d56145226e57c00 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Tue Feb 11 02:01:37 2025 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sat Feb 15 01:43:06 2025 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=45a39078
Simplify utime wrappers Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> libsandbox/wrapper-funcs/__futimesat64.c | 3 ++- libsandbox/wrapper-funcs/__lutimes64.c | 3 ++- libsandbox/wrapper-funcs/__utime64.c | 3 ++- libsandbox/wrapper-funcs/__utimensat64.c | 3 ++- libsandbox/wrapper-funcs/__utimes64.c | 3 ++- libsandbox/wrapper-funcs/futimesat.c | 4 +--- libsandbox/wrapper-funcs/lutimes.c | 4 +--- libsandbox/wrapper-funcs/utime.c | 4 +--- libsandbox/wrapper-funcs/utimensat.c | 4 +--- libsandbox/wrapper-funcs/utimes.c | 4 +--- 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/libsandbox/wrapper-funcs/__futimesat64.c b/libsandbox/wrapper-funcs/__futimesat64.c index 9ad791e..8068a87 100644 --- a/libsandbox/wrapper-funcs/__futimesat64.c +++ b/libsandbox/wrapper-funcs/__futimesat64.c @@ -9,5 +9,6 @@ * NB: Reusing the 32-bit time interface isn't entirely correct as the 64-bit time interface uses a * different structure, but we never decode the time values in sandbox, so it doesn't matter to use. */ -#define WRAPPER_SAFE() _SB_SAFE_AT(SB_NR_FUTIMESAT, STRING_NAME, dirfd, filename, 0) +#undef WRAPPER_NR +#define WRAPPER_NR SB_NR_FUTIMESAT #include "futimesat.c" diff --git a/libsandbox/wrapper-funcs/__lutimes64.c b/libsandbox/wrapper-funcs/__lutimes64.c index edab47c..a6fc62c 100644 --- a/libsandbox/wrapper-funcs/__lutimes64.c +++ b/libsandbox/wrapper-funcs/__lutimes64.c @@ -9,5 +9,6 @@ * NB: Reusing the 32-bit time interface isn't entirely correct as the 64-bit time interface uses a * different structure, but we never decode the time values in sandbox, so it doesn't matter to use. */ -#define WRAPPER_SAFE() _SB_SAFE(SB_NR_LUTIMES, STRING_NAME, filename) +#undef WRAPPER_NR +#define WRAPPER_NR SB_NR_LUTIMES #include "lutimes.c" diff --git a/libsandbox/wrapper-funcs/__utime64.c b/libsandbox/wrapper-funcs/__utime64.c index 4e1b573..4c3b4c8 100644 --- a/libsandbox/wrapper-funcs/__utime64.c +++ b/libsandbox/wrapper-funcs/__utime64.c @@ -9,5 +9,6 @@ * NB: Reusing the 32-bit time interface isn't entirely correct as the 64-bit time interface uses a * different structure, but we never decode the time values in sandbox, so it doesn't matter to use. */ -#define WRAPPER_SAFE() _SB_SAFE(SB_NR_UTIME, STRING_NAME, filename) +#undef WRAPPER_NR +#define WRAPPER_NR SB_NR_UTIME #include "utime.c" diff --git a/libsandbox/wrapper-funcs/__utimensat64.c b/libsandbox/wrapper-funcs/__utimensat64.c index 4ef1c69..c56dff1 100644 --- a/libsandbox/wrapper-funcs/__utimensat64.c +++ b/libsandbox/wrapper-funcs/__utimensat64.c @@ -9,5 +9,6 @@ * NB: Reusing the 32-bit time interface isn't entirely correct as the 64-bit time interface uses a * different structure, but we never decode the time values in sandbox, so it doesn't matter to use. */ -#define WRAPPER_SAFE() _SB_SAFE_AT(SB_NR_UTIMENSAT, STRING_NAME, dirfd, filename, flags) +#undef WRAPPER_NR +#define WRAPPER_NR SB_NR_UTIMENSAT #include "utimensat.c" diff --git a/libsandbox/wrapper-funcs/__utimes64.c b/libsandbox/wrapper-funcs/__utimes64.c index 3fa6688..3154f5e 100644 --- a/libsandbox/wrapper-funcs/__utimes64.c +++ b/libsandbox/wrapper-funcs/__utimes64.c @@ -9,5 +9,6 @@ * NB: Reusing the 32-bit time interface isn't entirely correct as the 64-bit time interface uses a * different structure, but we never decode the time values in sandbox, so it doesn't matter to use. */ -#define WRAPPER_SAFE() _SB_SAFE(SB_NR_UTIMES, STRING_NAME, filename) +#undef WRAPPER_NR +#define WRAPPER_NR SB_NR_UTIMES #include "utimes.c" diff --git a/libsandbox/wrapper-funcs/futimesat.c b/libsandbox/wrapper-funcs/futimesat.c index bc1a966..6f6481b 100644 --- a/libsandbox/wrapper-funcs/futimesat.c +++ b/libsandbox/wrapper-funcs/futimesat.c @@ -7,7 +7,5 @@ #define WRAPPER_ARGS_PROTO int dirfd, const char *filename, const struct timeval times[2] #define WRAPPER_ARGS dirfd, filename, times -#ifndef WRAPPER_SAFE -# define WRAPPER_SAFE() SB_SAFE_AT(dirfd, filename, 0) -#endif +#define WRAPPER_SAFE() SB_SAFE_AT(dirfd, filename, 0) #include "__wrapper_simple.c" diff --git a/libsandbox/wrapper-funcs/lutimes.c b/libsandbox/wrapper-funcs/lutimes.c index fb9ae68..3192a33 100644 --- a/libsandbox/wrapper-funcs/lutimes.c +++ b/libsandbox/wrapper-funcs/lutimes.c @@ -7,7 +7,5 @@ #define WRAPPER_ARGS_PROTO const char *filename, const struct timeval times[2] #define WRAPPER_ARGS filename, times -#ifndef WRAPPER_SAFE -# define WRAPPER_SAFE() SB_SAFE(filename) -#endif +#define WRAPPER_SAFE() SB_SAFE(filename) #include "__wrapper_simple.c" diff --git a/libsandbox/wrapper-funcs/utime.c b/libsandbox/wrapper-funcs/utime.c index 4bbf374..f0a6814 100644 --- a/libsandbox/wrapper-funcs/utime.c +++ b/libsandbox/wrapper-funcs/utime.c @@ -7,7 +7,5 @@ #define WRAPPER_ARGS_PROTO const char *filename, const struct utimbuf *times #define WRAPPER_ARGS filename, times -#ifndef WRAPPER_SAFE -# define WRAPPER_SAFE() SB_SAFE(filename) -#endif +#define WRAPPER_SAFE() SB_SAFE(filename) #include "__wrapper_simple.c" diff --git a/libsandbox/wrapper-funcs/utimensat.c b/libsandbox/wrapper-funcs/utimensat.c index 3baf89c..840ff18 100644 --- a/libsandbox/wrapper-funcs/utimensat.c +++ b/libsandbox/wrapper-funcs/utimensat.c @@ -7,7 +7,5 @@ #define WRAPPER_ARGS_PROTO int dirfd, const char *filename, const struct timespec times[2], int flags #define WRAPPER_ARGS dirfd, filename, times, flags -#ifndef WRAPPER_SAFE -# define WRAPPER_SAFE() SB_SAFE_AT(dirfd, filename, flags) -#endif +#define WRAPPER_SAFE() SB_SAFE_AT(dirfd, filename, flags) #include "__wrapper_simple.c" diff --git a/libsandbox/wrapper-funcs/utimes.c b/libsandbox/wrapper-funcs/utimes.c index 902c6f5..b117895 100644 --- a/libsandbox/wrapper-funcs/utimes.c +++ b/libsandbox/wrapper-funcs/utimes.c @@ -7,7 +7,5 @@ #define WRAPPER_ARGS_PROTO const char *filename, const struct timeval times[2] #define WRAPPER_ARGS filename, times -#ifndef WRAPPER_SAFE -# define WRAPPER_SAFE() SB_SAFE(filename) -#endif +#define WRAPPER_SAFE() SB_SAFE(filename) #include "__wrapper_simple.c"
