123456789101112131415161718192021222324252627282930313233343536 |
- #include <sys/io.h>
- #include <errno.h>
- #define MAX_PORT 0x10000
- int iopl(int level)
- {
- if (level > 3) {
- __set_errno(EINVAL);
- return -1;
- }
- if (level)
- return ioperm(0, MAX_PORT, 1);
- return 0;
- }
|