syscall: add SYS_SETNS syscall number

Red Bear OS needs SYS_SETNS for the init process to enter a null
namespace before its waitpid loop (used by redox_setrens_v1).
SYS_MKNS was already defined; this adds the matching SETNS.
This commit is contained in:
2026-07-10 16:13:15 +03:00
parent 8e4643c9de
commit 20dd16542c
+5
View File
@@ -42,6 +42,11 @@ pub const SYS_FTRUNCATE: usize = SYS_CLASS_FILE | 0x1B3;
pub const SYS_FUTIMENS: usize = SYS_CLASS_FILE | 0x1B4;
pub const SYS_FSTATVFS: usize = SYS_CLASS_FILE | 0x1B5;
pub const SYS_MKNS: usize = SYS_CLASS_FILE | 0x1B6;
/// Red Bear: set current namespace to the one referenced by `fd`.
/// `SYS_SETNS = SYS_CLASS_FILE | 0x1B7`. Pairs with `SYS_MKNS` for the
/// `redox_setrens_v1` / `redox-rt::sys::mkns` + `setns` pair that init uses
/// to enter a "null namespace" before its waitpid loop.
pub const SYS_SETNS: usize = SYS_CLASS_FILE | 0x1B7;
// SYS_CALL, fd, inout buf ptr, inout buf len, flags, metadata buf ptr, metadata buf len
// TODO: new number for SYS_CALL where flags are sent as 6th argument (using syscall6)