sys_truncate64  [fs/open.c]


Truncates a file to the specified length. This is a LFS version of sys_truncate.

Arguments

eax 193
ebx Pointer to a null-terminated string specifying the name of the file to truncate. The file must be writable.
ecx The low order 32-bits of a signed value that specifies the number of bytes to truncate.
edx The high order 32-bits of a signed value that specifies the number of bytes to truncate.

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EACCES Search permission is denied for a component of the path prefix, or the named file is not writable by the user.
-EFAULT ebx points outside the process's allocated address space.
-EFBIG The argument ecx is larger than the maximum file size. (XSI)
-EINTR A signal was caught during execution.
-EINVAL The argument ecx is negative or larger than the maximum file size.
-EIO An I/O error occurred updating the inode.
-EISDIR The named file is a directory.
-ELOOP Too many symbolic links were encountered in translating the pathname.
-ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire pathname exceeded 1023 characters.
-ENOENT The named file does not exist.
-ENOTDIR A component of the path prefix is not a directory.
-EPERM The underlying file system does not support extending a file beyond its current size.
-EROFS The named file resides on a read-only file system.
-ETXTBSY The file is a pure procedure (shared text) file that is being executed.

Remarks

The file offset is not changed.

Compatibility

n/a