blob: 3d379d42ff8d62bad9dfb25cc8f876c48caf3ae6 [file] [log] [blame]
Fei Jie1eb00512016-04-19 15:38:33 +08001#include "tests.h"
2#include <sys/syscall.h>
3
4#ifdef __NR_iopl
5
6# include <errno.h>
7# include <stdio.h>
8# include <unistd.h>
9
10int
11main(void)
12{
13 long rc = syscall(__NR_iopl, 4);
14 const char *error_text;
15 switch (errno) {
16 case ENOSYS:
17 error_text = "ENOSYS";
18 break;
19 case EPERM:
20 error_text = "EPERM";
21 break;
22 default:
23 error_text = "EINVAL";
24 }
25 printf("iopl(4) = %ld %s (%m)\n", rc, error_text);
26
27 puts("+++ exited with 0 +++");
28 return 0;
29}
30
31#else
32
33SKIP_MAIN_UNDEFINED("__NR_iopl")
34
35#endif