VxWorks Reference Manual : Libraries
ftruncate - POSIX file truncation
ftruncate( ) - truncate a file (POSIX)
ftruncate( ) - truncate a file (POSIX)
int ftruncate ( int fildes, /* fd of file to truncate */ off_t length /* length to truncate file */ )
This routine truncates a file to a specified size.
0 (OK) or -1 (ERROR) if unable to truncate file.
EROFS
- File resides on a read-only file system.
EBADF
- File is open for reading only.
EINVAL
- File descriptor refers to a file on which this operation is impossible.