Truncates a file to the specified length. This system call is identical to sys_truncate except it uses a file descriptor for specifying the file.
Arguments
eax |
93 |
ebx |
File descriptor. The file must be open for writing. |
ecx |
Number of bytes to truncate. If the file size is smaller that this value, it will be extended by this number of bytes. |
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:
-EBADF |
The ebx is not a valid descriptor |
-EBADF, -EINVAL |
The file is not open for writing. |
-EINVAL |
The file descriptor does not reference a regular file. |
|
Remarks
The file offset is not changed.
Compatibility
n/a |