blob: 0a810c14f2e8654be0f5548d46d6a78b05044589 [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
6# include <errno.h>
7# include <stdio.h>
8# include <unistd.h>
9
10int
11main(void)
12{
13 static const char sample[] = "mkdir";
14
15 long rc = syscall(__NR_mkdir, sample, 0600);
16 printf("mkdir(\"%s\", 0600) = %ld %s (%m)\n",
17 sample, rc, errno == ENOSYS ? "ENOSYS" : "EEXIST");
18
19 puts("+++ exited with 0 +++");
20 return 0;
21}
22
23#else
24
25SKIP_MAIN_UNDEFINED("__NR_mkdir")
26
27#endif