blob: 944ba2358d5d1ed674954a8dae1517c826aca003 [file] [log] [blame]
Guido van Rossumd4d77281994-08-19 10:51:31 +00001/* The equivalent of the Unix 'sync' system call: FlushVol.
2 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
3 For now, we only flush the default volume
4 (since that's the only volume written to by MacB). */
5
6#include "macdefs.h"
7
8int
Jack Jansen9ae898b2000-07-11 21:16:03 +00009sync(void)
Guido van Rossumd4d77281994-08-19 10:51:31 +000010{
11 if (FlushVol((StringPtr)0, 0) == noErr)
12 return 0;
13 else {
14 errno= ENODEV;
15 return -1;
16 }
17}