diff options
| author | Wim de With <wf@dewith.io> | 2025-10-19 18:17:45 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-19 22:24:24 +0200 |
| commit | 49eea79ec20b319ee2aa89bcbfd481111b5caa27 (patch) | |
| tree | 23cafbfd5dd71a68010085ac01c347c6fd9dc88f /lib/std | |
| parent | 5442e06632eaea7d02759db25c779d6a17e507c7 (diff) | |
| download | zig-49eea79ec20b319ee2aa89bcbfd481111b5caa27.tar.gz zig-49eea79ec20b319ee2aa89bcbfd481111b5caa27.zip | |
std.os.linux: add pivot_root syscall
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/os/linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 15de6580f2..10feead2ae 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -968,6 +968,10 @@ pub fn umount2(special: [*:0]const u8, flags: u32) usize { return syscall2(.umount2, @intFromPtr(special), flags); } +pub fn pivot_root(new_root: [*:0]const u8, put_old: [*:0]const u8) usize { + return syscall2(.pivot_root, @intFromPtr(new_root), @intFromPtr(put_old)); +} + pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: MAP, fd: i32, offset: i64) usize { if (@hasField(SYS, "mmap2")) { return syscall6( |
