Skip to content

Commit 93ac87c

Browse files
marler8997andrewrk
authored andcommitted
Mark fstype argument to mount as optional
The fstype argument to the mount system call can be null. To see an example run "strace -e trace=mount unshare -m": ``` mount("none", "/", NULL, MS_REC|MS_PRIVATE, NULL) = 0 ... ```
1 parent 86570b3 commit 93ac87c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/os/linux.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub fn mknodat(dirfd: i32, path: [*:0]const u8, mode: u32, dev: u32) usize {
376376
return syscall4(.mknodat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, dev);
377377
}
378378

379-
pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: [*:0]const u8, flags: u32, data: usize) usize {
379+
pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: ?[*:0]const u8, flags: u32, data: usize) usize {
380380
return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data);
381381
}
382382

0 commit comments

Comments
 (0)