| ... | @@ -253,6 +253,18 @@ pub fn mkdirat(dirfd: i32, path: [*:0]const u8, mode: u32) usize { | ... | @@ -253,6 +253,18 @@ pub fn mkdirat(dirfd: i32, path: [*:0]const u8, mode: u32) usize { |
| 253 | return syscall3(.mkdirat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode); | 253 | return syscall3(.mkdirat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode); |
| 254 | } | 254 | } |
| 255 | | 255 | |
| | 256 | pub fn mknod(path: [*:0]const u8, mode: u32, dev: u32) usize { |
| | 257 | if (@hasField(SYS, "mknod")) { |
| | 258 | return syscall3(.mknod, @ptrToInt(path), mode, dev); |
| | 259 | } else { |
| | 260 | return mknodat(AT_FDCWD, path, mode, dev); |
| | 261 | } |
| | 262 | } |
| | 263 | |
| | 264 | pub fn mknodat(dirfd: i32, path: [*:0]const u8, mode: u32, dev: u32) usize { |
| | 265 | return syscall4(.mknodat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, dev); |
| | 266 | } |
| | 267 | |
| 256 | pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: [*:0]const u8, flags: u32, data: usize) usize { | 268 | pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: [*:0]const u8, flags: u32, data: usize) usize { |
| 257 | return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data); | 269 | return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data); |
| 258 | } | 270 | } |