sys_ftruncate

Function sys_ftruncate 

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

Linux sys_ftruncate implementation

Truncate a file to a specified length using a file descriptor.

Arguments:

  • fd: File descriptor to truncate
  • length: New file length

Returns:

  • 0 on success
  • negative errno on failure