6 #include <sys/syscall.h>
9 # define TEST_SYSCALL_STR "oldumount"
11 # if defined __NR_umount && defined __NR_umount2
12 # define __NR_oldumount __NR_umount
13 # define TEST_SYSCALL_STR "umount"
21 static const char sample[] = "umount.sample";
22 if (mkdir(sample, 0700)) {
26 (void) syscall(__NR_oldumount, sample);
27 printf("%s(\"%s\") = -1 ", TEST_SYSCALL_STR, sample);
30 printf("ENOSYS (%m)\n");
33 printf("EPERM (%m)\n");
36 printf("EINVAL (%m)\n");
39 puts("+++ exited with 0 +++");