Update openat function to include fcntl_flags parameter

This commit is contained in:
Darley Barreto
2025-07-12 14:26:17 -03:00
parent eb4c83bd50
commit 61f7b1bc31
+2 -2
View File
@@ -181,9 +181,9 @@ pub fn open<T: AsRef<str>>(path: T, flags: usize) -> Result<usize> {
}
/// Open a file at a specific path
pub fn openat<T: AsRef<str>>(fd: usize, path: T, flags: usize) -> Result<usize> {
pub fn openat<T: AsRef<str>>(fd: usize, path: T, flags: usize, fcntl_flags: usize) -> Result<usize> {
let path = path.as_ref();
unsafe { syscall4(SYS_OPENAT, fd, path.as_ptr() as usize, path.len(), flags) }
unsafe { syscall5(SYS_OPENAT, fd, path.as_ptr() as usize, path.len(), flags, fcntl_flags) }
}
/// Read from a file descriptor into a buffer