Jump to content

FS NEWSIZE: Difference between revisions

From EDM2
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 ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
Changes a file's logical (EOD) size.  
{{DISPLAYTITLE:FS_NEWSIZE}}
Changes a file's logical (EOD) size.


==Syntax==
==Syntax==
  FS_NEWSIZE(psffsi, psffsd, len, IOflag)
  FS_NEWSIZE(psffsi, psffsd, len, IOflag)
==Parameters==
==Parameters==
;psffsi :is a pointer to the file-system-independent portion of an open file instance.  
;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.
;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.
;len :is the desired new length of the file.  
:IOflag == 0x0010 indicates write-through.
 
:IOflag == 0x0020 indicates no-cache.
;IOflag :indicates information about the operation on the handle.  


:IOflag == 0x0010 indicates write-through.
==Calling Sequence==
:IOflag == 0x0020 indicates no-cache.
==Returns==
==Sample==
Calling Sequence
<PRE>
<PRE>
int far pascal FS_NEWSIZE(psffsi, psffsd, len, IOflag)
int far pascal FS_NEWSIZE(psffsi, psffsd, len, IOflag)
Line 24: Line 21:
unsigned long len;
unsigned long len;
unsigned short IOflag;
unsigned short IOflag;
</PRE>


</PRE>
==Remarks==
==Remarks==
The FSD should return an error if an attempt is made to write beyond the end with a direct access device handle.  
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.  
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.  
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.


[[Category:IFS Interfaces]]
[[Category:IFS Interfaces]]
{{DISPLAYTITLE:FS_NEWSIZE}}

Latest revision as of 03:12, 10 February 2020

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.

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.