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 stringtrapframe.get_arg(1)
- New length for the file
§Returns
0
on successusize::MAX
on error (file not found, permission denied, etc.)