blob: 1c11640dd3a85cd03187142f9238d2d630a78d1d [file] [log] [blame]
Fei Jie4c4ab0f2016-03-31 16:06:51 +08001#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
10int
11main(void)
12{
13 const long int fd = (long int) 0xdeadbeefffffffff;
Dmitry V. Levin02269e52016-04-21 20:41:38 +000014
15 long rc = syscall(__NR_fdatasync, fd);
16 printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
Fei Jie4c4ab0f2016-03-31 16:06:51 +080017
18 puts("+++ exited with 0 +++");
19 return 0;
20}
21
22#else
23
24SKIP_MAIN_UNDEFINED("__NR_fdatasync")
25
26#endif