Fei Jie | 5c1776f | 2016-04-21 15:53:49 +0800 | [diff] [blame] | 1 | #include "tests.h" |
| 2 | #include <sys/syscall.h> |
| 3 | |
| 4 | #ifdef __NR_mkdir |
| 5 | |
Fei Jie | 5c1776f | 2016-04-21 15:53:49 +0800 | [diff] [blame] | 6 | # include <stdio.h> |
| 7 | # include <unistd.h> |
| 8 | |
| 9 | int |
| 10 | main(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. Levin | 9f6611b | 2016-04-21 17:49:32 +0000 | [diff] [blame] | 16 | sample, rc, errno2name()); |
Fei Jie | 5c1776f | 2016-04-21 15:53:49 +0800 | [diff] [blame] | 17 | |
| 18 | puts("+++ exited with 0 +++"); |
| 19 | return 0; |
| 20 | } |
| 21 | |
| 22 | #else |
| 23 | |
| 24 | SKIP_MAIN_UNDEFINED("__NR_mkdir") |
| 25 | |
| 26 | #endif |