| OLD | NEW |
| 1 /* Check error message for invalid sysctl call. | 1 /* Check error message for invalid sysctl call. |
| 2 #xerror: | 2 #xerror: |
| 3 #output: Unimplemented _sysctl syscall *\n | 3 #output: Unimplemented _sysctl syscall *\n |
| 4 #output: program stopped with signal 4.\n | 4 #output: program stopped with signal 4 (*).\n |
| 5 #notarget: cris*-*-elf | 5 #notarget: cris*-*-elf |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 #include <sys/syscall.h> | 9 #include <sys/syscall.h> |
| 10 #include <errno.h> | 10 #include <errno.h> |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 #include <errno.h> | 13 #include <errno.h> |
| 14 | 14 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 32 sizeof (sysctl_args) / sizeof (sysctl_args[0]), | 32 sizeof (sysctl_args) / sizeof (sysctl_args[0]), |
| 33 (void *) -1, &x, NULL, 0 | 33 (void *) -1, &x, NULL, 0 |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 int err = syscall (SYS__sysctl, &scargs); | 36 int err = syscall (SYS__sysctl, &scargs); |
| 37 if (err == -1 && errno == ENOSYS) | 37 if (err == -1 && errno == ENOSYS) |
| 38 printf ("ENOSYS\n"); | 38 printf ("ENOSYS\n"); |
| 39 printf ("xyzzy\n"); | 39 printf ("xyzzy\n"); |
| 40 exit (0); | 40 exit (0); |
| 41 } | 41 } |
| OLD | NEW |