]> granicus.if.org Git - strace/blob - tests/fdatasync.c
tests/fdatasync.c: print syscall() result using %ld format
[strace] / tests / fdatasync.c
1 #include "tests.h"
2 #include <sys/syscall.h>
3
4 #ifdef __NR_fdatasync
5
6 # include <errno.h>
7 # include <stdio.h>
8 # include <unistd.h>
9
10 int
11 main(void)
12 {
13         const long int fd = (long int) 0xdeadbeefffffffff;
14
15         long rc = syscall(__NR_fdatasync, fd);
16         printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
17
18         puts("+++ exited with 0 +++");
19         return 0;
20 }
21
22 #else
23
24 SKIP_MAIN_UNDEFINED("__NR_fdatasync")
25
26 #endif