Jump to content

FSH FLUSHBUF: Difference between revisions

From EDM2
No edit summary
No edit summary
Line 3: Line 3:
|Remarks=REMOVED in OS/2 Version 2.0  
|Remarks=REMOVED in OS/2 Version 2.0  
}}
}}
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==
==Syntax==
  FSH_FLUSHBUF(hVPB, fDiscard)  
  FSH_FLUSHBUF (hVPB, fDiscard)


==Parameters==
==Parameters==
;hVPB
;hVPB : handle to the volume to be flushed


;fDiscard
; 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==
==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==
==Calling Sequence==
<PRE>
<PRE>
int far pascal FSH_FLUSHBUF(hVPB, fDiscard)  
int pascal FSH_FLUSHBUF (hVPB, fDiscard)


unsigned short hVPB;
unsigned long hVPB;
unsigned short fDiscard;
unsigned long fDiscard;
</PRE>
</PRE>


==Remarks==
==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.


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

Revision as of 16:01, 20 February 2020

Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement:
Remarks: REMOVED in OS/2 Version 2.0

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.