pub fn sys_linkat(abi: &mut LinuxRiscv64Abi, trapframe: &mut Trapframe) -> usizeExpand description
Linux sys_linkat implementation for Scarlet VFS v2
Creates a hard link to an existing file. Both oldpath and newpath can be relative to their respective directory file descriptors.
Arguments:
- abi: LinuxRiscv64Abi context
- trapframe: Trapframe containing syscall arguments
- arg0: olddirfd (old directory file descriptor)
- arg1: oldpath_ptr (pointer to source path string)
- arg2: newdirfd (new directory file descriptor)
- arg3: newpath_ptr (pointer to destination path string)
- arg4: flags (link flags)
Returns:
- 0 on success
- usize::MAX (Linux -1) on error