Sets the file size.
#include <dfs.h> int dfs_seteof ( int fildes, size64_t newSize, int truncBlockFlag );
(IN) Specifies the file handle returned from a prior dfs_sopen or dfs_creat call for the indicated file.
(IN) Specifies the new file size in bytes.
(IN) Specifies a nonzero value to indicate that any blocks truncated by the new file size should be freed up for future OS use. Specifies 0 to indicate that any truncated blocks should not be freed.
If successful, returns 0. Otherwise, returns a nonzero error code:
For possible DFS errors, see Section 13.4.5, DFS Return Values.
If the connection making the request is the only entity with the file open and if the truncBlockFlag is nonzero, setting a new file size that is one or more blocks less than the previous file size causes blocks (actually allocated) beyond the new defined file size to be truncated, or returned for future OS usage. If a new file size is specified that is greater than the previous file size, the newly defined file area is zero-filled, provided that actual file space is allocated. A new file size can be specified that is beyond the range of current allocated file space, or that is less than current allocated file space.