Merge branch 'add-mkdirat' into 'master'

Implement mkdirat

See merge request redox-os/relibc!878
This commit is contained in:
Jeremy Soller
2026-01-09 06:09:09 -07:00
4 changed files with 34 additions and 1 deletions
+5 -1
View File
@@ -504,8 +504,12 @@ impl Pal for Sys {
e_raw(unsafe { syscall!(LSEEK, fildes, offset, whence) }).map(|o| o as off_t)
}
fn mkdirat(dir_fildes: c_int, path: CStr, mode: mode_t) -> Result<()> {
e_raw(unsafe { syscall!(MKDIRAT, dir_fildes, path.as_ptr(), mode) }).map(|_| ())
}
fn mkdir(path: CStr, mode: mode_t) -> Result<()> {
e_raw(unsafe { syscall!(MKDIRAT, AT_FDCWD, path.as_ptr(), mode) }).map(|_| ())
Sys::mkdirat(AT_FDCWD, path, mode)
}
fn mknodat(dir_fildes: c_int, path: CStr, mode: mode_t, dev: dev_t) -> Result<()> {