#include #include #include #include #include #include int main (int argc, char **argv) { int fd, status; fd = open(".", O_RDONLY); if (fd < 0) { perror("open"); exit(1); } status = fsync(fd); if (status != 0) { perror("fsync"); exit(2); } close(fd); printf("OK\n"); exit(0); }