sys_readlinkat

Function sys_readlinkat 

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

Linux sys_readlinkat implementation

Reads the target of a symbolic link relative to a directory file descriptor. Properly queries the VFS and does not append a null terminator.

Arguments:

  • abi: LinuxRiscv64Abi context
  • trapframe: Trapframe containing syscall arguments
    • arg0: dirfd (directory file descriptor or AT_FDCWD)
    • arg1: pathname (pointer to path string)
    • arg2: buf (buffer to store link contents)
    • arg3: bufsiz (size of buffer)

Returns:

  • Number of bytes placed in buf on success
  • usize::MAX (Linux -1) on error