Function sys_vfs_truncate

Source
pub fn sys_vfs_truncate(trapframe: &mut Trapframe) -> usize
Expand description

Truncate a file by path (VfsTruncate)

This system call truncates a file at the specified path to the given length.

§Arguments

  • trapframe.get_arg(0) - Pointer to the null-terminated path string
  • trapframe.get_arg(1) - New length for the file

§Returns

  • 0 on success
  • usize::MAX on error (file not found, permission denied, etc.)