From: Ben Gras Date: Mon, 5 Sep 2005 21:22:45 +0000 (+0000) Subject: Add fsync() interface. X-Git-Tag: v3.1.0~180 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=aad54cb32cb0c0a1fbebeb5f42a2b5b094149bb4;p=minix.git Add fsync() interface. --- diff --git a/lib/posix/Makefile b/lib/posix/Makefile index a985633a7..0eb66ff54 100755 --- a/lib/posix/Makefile +++ b/lib/posix/Makefile @@ -34,6 +34,7 @@ OBJECTS = \ $(LIBRARY)(_fpathconf.o) \ $(LIBRARY)(_fstat.o) \ $(LIBRARY)(_fstatfs.o) \ + $(LIBRARY)(_fsync.o) \ $(LIBRARY)(_getcwd.o) \ $(LIBRARY)(_getegid.o) \ $(LIBRARY)(_geteuid.o) \ @@ -185,6 +186,9 @@ $(LIBRARY)(_fpathconf.o): _fpathconf.c $(LIBRARY)(_fstat.o): _fstat.c $(CC1) _fstat.c +$(LIBRARY)(_fsync.o): _fsync.c + $(CC1) _fsync.c + $(LIBRARY)(_fstatfs.o): _fstatfs.c $(CC1) _fstatfs.c diff --git a/lib/posix/_fsync.c b/lib/posix/_fsync.c new file mode 100755 index 000000000..86ef0a5af --- /dev/null +++ b/lib/posix/_fsync.c @@ -0,0 +1,12 @@ +#include +#define sync _sync +#include + +PUBLIC int fsync(int fd) +{ + message m; + + m.m1_i1 = fd; + + return(_syscall(FS, FSYNC, &m)); +}