1994-08-19 07:51:31 -03:00
|
|
|
/* The equivalent of the Unix 'sync' system call: FlushVol.
|
|
|
|
Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
|
|
|
|
For now, we only flush the default volume
|
|
|
|
(since that's the only volume written to by MacB). */
|
|
|
|
|
|
|
|
#include "macdefs.h"
|
|
|
|
|
2002-06-26 17:43:24 -03:00
|
|
|
void
|
2000-07-11 18:16:03 -03:00
|
|
|
sync(void)
|
1994-08-19 07:51:31 -03:00
|
|
|
{
|
|
|
|
if (FlushVol((StringPtr)0, 0) == noErr)
|
2002-06-26 17:43:24 -03:00
|
|
|
return;
|
1994-08-19 07:51:31 -03:00
|
|
|
else {
|
|
|
|
errno= ENODEV;
|
2002-06-26 17:43:24 -03:00
|
|
|
return;
|
1994-08-19 07:51:31 -03:00
|
|
|
}
|
|
|
|
}
|