summaryrefslogtreecommitdiffstats
path: root/Mac/Compat/sync.c
blob: a6487e12ca80f9669ec3e8f8ce23d3d442e81dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* 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"

int
sync()
{
	if (FlushVol((StringPtr)0, 0) == noErr)
		return 0;
	else {
		errno= ENODEV;
		return -1;
	}
}