2 Copyright © 2004-2007, The AROS Development Team. All rights reserved.
5 POSIX function fsync().
8 #include <exec/types.h>
9 #include <dos/dosextens.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
19 /* FIXME: documentation */
21 fdesc
*fdesc
= __getfdesc(fd
);
23 if (!fdesc
|| !(fdesc
->flags
& O_WRITE
))
29 if (!Flush((BPTR
) fdesc
->fh
))
31 errno
= IoErr2errno(IoErr());