sys_newfstatat

Function sys_newfstatat 

Source
pub fn sys_newfstatat(
    abi: &mut LinuxRiscv64Abi,
    trapframe: &mut Trapframe,
) -> usize
Expand description

Linux sys_newfstatat implementation for Scarlet VFS v2

Gets file status relative to a directory file descriptor (dirfd) and path. If dirfd == AT_FDCWD, uses the current working directory as the base. Otherwise, resolves the base directory from the file descriptor. Uses VfsManager::resolve_path_from for safe and efficient path resolution.

Arguments:

  • abi: LinuxRiscv64Abi context
  • trapframe: Trapframe containing syscall arguments

Returns:

  • 0 on success
  • usize::MAX (Linux -1) on error