Add fsync() interface.
This commit is contained in:
parent
b2bb27eda1
commit
aad54cb32c
@ -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
|
||||
|
||||
|
12
lib/posix/_fsync.c
Executable file
12
lib/posix/_fsync.c
Executable file
@ -0,0 +1,12 @@
|
||||
#include <lib.h>
|
||||
#define sync _sync
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int fsync(int fd)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.m1_i1 = fd;
|
||||
|
||||
return(_syscall(FS, FSYNC, &m));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user