blob: dbb43c3bf247c62ef4d43201c5abbf1c582eb523 [file] [log] [blame]
Fei Jie5c1776f2016-04-21 15:53:49 +08001#include "tests.h"
2#include <sys/syscall.h>
3
4#ifdef __NR_mkdir
5
Fei Jie5c1776f2016-04-21 15:53:49 +08006# include <stdio.h>
7# include <unistd.h>
8
9int
10main(void)
11{
12 static const char sample[] = "mkdir";
13
14 long rc = syscall(__NR_mkdir, sample, 0600);
15 printf("mkdir(\"%s\", 0600) = %ld %s (%m)\n",
Dmitry V. Levin9f6611b2016-04-21 17:49:32 +000016 sample, rc, errno2name());
Fei Jie5c1776f2016-04-21 15:53:49 +080017
18 puts("+++ exited with 0 +++");
19 return 0;
20}
21
22#else
23
24SKIP_MAIN_UNDEFINED("__NR_mkdir")
25
26#endif