1*4b169a6bSchristos /* Test unknown-syscall output.
2*4b169a6bSchristos #progos: linux
3*4b169a6bSchristos #xerror:
4*4b169a6bSchristos #output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
5*4b169a6bSchristos #output: program stopped with signal 4 (*).\n
6*4b169a6bSchristos */
7*4b169a6bSchristos
8*4b169a6bSchristos #include <unistd.h>
9*4b169a6bSchristos #include <stdio.h>
10*4b169a6bSchristos #include <stdlib.h>
11*4b169a6bSchristos #include <errno.h>
12*4b169a6bSchristos
main(void)13*4b169a6bSchristos int main (void)
14*4b169a6bSchristos {
15*4b169a6bSchristos int err;
16*4b169a6bSchristos
17*4b169a6bSchristos /* Check special case of number 0 syscall. */
18*4b169a6bSchristos err = syscall (0, 3, 2, 1, 4, 6, 5);
19*4b169a6bSchristos if (err == -1 && errno == ENOSYS)
20*4b169a6bSchristos printf ("ENOSYS\n");
21*4b169a6bSchristos printf ("xyzzy\n");
22*4b169a6bSchristos exit (0);
23*4b169a6bSchristos }
24