From: Michael Tremer Date: Tue, 25 Mar 2025 10:44:50 +0000 (+0000) Subject: jail: Move syscall wrapper to where it should be X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbcbb0159ba49620b8d1140ff243a0dc465f10a4;p=pakfire.git jail: Move syscall wrapper to where it should be Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/jail.c b/src/pakfire/jail.c index edb32b2d..81e6844f 100644 --- a/src/pakfire/jail.c +++ b/src/pakfire/jail.c @@ -179,10 +179,6 @@ struct pakfire_jail_exec { } callbacks; }; -static int pivot_root(const char* new_root, const char* old_root) { - return syscall(SYS_pivot_root, new_root, old_root); -} - static int pakfire_jail_exec_has_flag( const struct pakfire_jail_exec* ctx, const enum pakfire_jail_exec_flags flag) { return ctx->flags & flag; diff --git a/src/pakfire/syscalls.h b/src/pakfire/syscalls.h index b66054a0..76c0d1fb 100644 --- a/src/pakfire/syscalls.h +++ b/src/pakfire/syscalls.h @@ -31,4 +31,8 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t* info, unsigne return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags); } +static inline int pivot_root(const char* new_root, const char* old_root) { + return syscall(SYS_pivot_root, new_root, old_root); +} + #endif /* PAKFIRE_SYSCALLS_H */