Fei Jie | 4c4ab0f | 2016-03-31 16:06:51 +0800 | [diff] [blame] | 1 | #include "tests.h" |
| 2 | #include <sys/syscall.h> |
| 3 | |
| 4 | #ifdef __NR_fdatasync |
| 5 | |
Fei Jie | 4c4ab0f | 2016-03-31 16:06:51 +0800 | [diff] [blame] | 6 | # include <stdio.h> |
| 7 | # include <unistd.h> |
| 8 | |
| 9 | int |
| 10 | main(void) |
| 11 | { |
| 12 | const long int fd = (long int) 0xdeadbeefffffffff; |
Dmitry V. Levin | 02269e5 | 2016-04-21 20:41:38 +0000 | [diff] [blame] | 13 | |
| 14 | long rc = syscall(__NR_fdatasync, fd); |
| 15 | printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); |
Fei Jie | 4c4ab0f | 2016-03-31 16:06:51 +0800 | [diff] [blame] | 16 | |
| 17 | puts("+++ exited with 0 +++"); |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | #else |
| 22 | |
| 23 | SKIP_MAIN_UNDEFINED("__NR_fdatasync") |
| 24 | |
| 25 | #endif |