/* COVERAGE: fdatasync fsync sync */ #include #include #include #include int main() { int fd; fd = creat("foobar",S_IREAD|S_IWRITE); sync(); // sync () = 0 fsync(fd); // fsync (4) = 0 fdatasync(fd); // fdatasync (4) = 0 close(fd); return 0; }