Jump to content

FS_NEWSIZE

From EDM2
Revision as of 01:19, 9 February 2020 by Martini (talk | contribs) (Created page with "Changes a file's logical (EOD) size. ==Syntax== FS_NEWSIZE(psffsi, psffsd, len, IOflag) ==Parameters== ;psffsi :is a pointer to the file-system-independent portion of an ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Changes a file's logical (EOD) size.

Syntax

FS_NEWSIZE(psffsi, psffsd, len, IOflag)

Parameters

psffsi
is a pointer to the file-system-independent portion of an open file instance.
psffsd
is a pointer to the file-system-dependent portion of an open file instance.
len
is the desired new length of the file.
IOflag
indicates information about the operation on the handle.
IOflag == 0x0010 indicates write-through.
IOflag == 0x0020 indicates no-cache.

Returns

Sample

Calling Sequence

int far pascal FS_NEWSIZE(psffsi, psffsd, len, IOflag)

struct sffsi far * psffsi;
struct sffsd far * psffsd;
unsigned long len;
unsigned short IOflag;

Remarks

The FSD should return an error if an attempt is made to write beyond the end with a direct access device handle.

The file system driver attempts to set the size (EOD) of the file to newsize and update sfi_size, if successful. If the new size is larger than the currently allocated size, the file system driver arranges for for efficient access to the newly-allocated storage.

Of the information passed in IOflag, the write-through bit is a mandatory bit in that any data written to the block device must be put out on the medium before the device driver returns. The no-cache bit, on the other hand, is an advisory bit that says whether the data being transferred is worth caching or not.