|
|
@@ -150,8 +150,11 @@ fn getdents64(fd: FD, buffer: *mut u8, bufsize: usize) -> KResult<usize> {
|
|
|
Ok(buffer.wrote())
|
|
|
}
|
|
|
|
|
|
-#[cfg(not(target_arch = "x86_64"))]
|
|
|
-#[eonix_macros::define_syscall(SYS_NEWFSTATAT)]
|
|
|
+#[cfg_attr(target_arch = "x86_64", eonix_macros::define_syscall(SYS_FSTATAT64))]
|
|
|
+#[cfg_attr(
|
|
|
+ not(target_arch = "x86_64"),
|
|
|
+ eonix_macros::define_syscall(SYS_NEWFSTATAT)
|
|
|
+)]
|
|
|
fn newfstatat(dirfd: FD, pathname: *const u8, statbuf: *mut Stat, flags: AtFlags) -> KResult<()> {
|
|
|
let dentry = if flags.at_empty_path() {
|
|
|
let file = thread.files.get(dirfd).ok_or(EBADF)?;
|
|
|
@@ -170,6 +173,17 @@ fn newfstatat(dirfd: FD, pathname: *const u8, statbuf: *mut Stat, flags: AtFlags
|
|
|
Ok(())
|
|
|
}
|
|
|
|
|
|
+#[eonix_macros::define_syscall(SYS_NEWFSTAT)]
|
|
|
+fn newfstat(fd: FD, statbuf: *mut Stat) -> KResult<()> {
|
|
|
+ sys_newfstatat(
|
|
|
+ thread,
|
|
|
+ fd,
|
|
|
+ core::ptr::null(),
|
|
|
+ statbuf,
|
|
|
+ AtFlags::AT_EMPTY_PATH,
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
#[eonix_macros::define_syscall(SYS_STATX)]
|
|
|
fn statx(
|
|
|
dirfd: FD,
|