Date: Sun, 30 Nov 1997 14:51:45 +0200 (IST) From: Eli Zaretskii To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: _flush_disk_cache docs Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Somebody asked for the docs to tell explicitly that this function was about disk caches, not DOS buffers. Here's the patch: *** src/libc/dos/io/flushdc.t~0 Fri Sep 20 02:38:56 1996 --- src/libc/dos/io/flushdc.txh Sat Nov 29 15:54:26 1997 *************** *** 10,17 **** @subheading Description Attempts to update the disk with the data cached in the write-behind ! disk cache. @subheading Return Value None. --- 10,31 ---- @subheading Description Attempts to update the disk with the data cached in the write-behind ! disk caches (such as @code{SmartDrv} and the built-in Windows 95 disk ! cache). ! ! Note that this does @strong{not} flushes the DOS buffers. You need to ! call @code{fsync} (@pxref{fsync}) or @code{close} (@pxref{close}) to ! force DOS to commit the file data to the disk; @code{sync} ! (@pxref{sync}) does that for all open files. @subheading Return Value None. + + @subheading Example + + @example + /* Make sure all files are actually written to disk. */ + sync (); + _flush_disk_cache (); + @end example