FSH FLUSHBUF

Flush buffer takes dirty sectors contained in the buffer cache on a particular media and writes them out. Optionally, the data can be discarded afterwards.

Syntax
FSH_FLUSHBUF (hVPB, fDiscard)

Parameters

 * hVPB : handle to the volume to be flushed
 * fDiscard : indicates disposition of cached data.
 * fDiscard == 0 indicates don't discard any buffers.
 * fDiscard == 1 indicates discard clean buffers
 * All other values are reserved.

Returns
Error code if any write failed. 0 otherwise.

ERROR_INVALID_PARAMETER - the value of Operation is invalid.

Device-driver/device-manager errors listed.

Calling Sequence
 int pascal FSH_FLUSHBUF (hVPB, fDiscard)

unsigned long hVPB; unsigned long fDiscard; 

Remarks
If fDiscard = 1 and a write error occurred, the data in the buffer(s) that generated the error is not discarded.

See note under FSH_GETBUF for interactions with other buffer calls.


 * Reminder: OS/2 does not validate input parameters, so FSD should call FSH_PROBEBUF where appropriate.

FSH_FLUSHBUF may block.