1
/* $Id: syscall_iopl.c 61 2006-05-19 18:32:14Z steve-beattie $ */
4
* Copyright (C) 2002-2005 Novell/SUSE
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License as
8
* published by the Free Software Foundation, version 2 of the
15
#include <sys/types.h>
16
#include <sys/io.h> /* for glibc */
20
int main(int argc, char *argv[])
24
fprintf(stderr, "usage: %s <ring>\n",
29
if ( (ring = strtol(argv[1], NULL, 0)) == 0) {
30
if (errno == EINVAL) {
31
fprintf(stderr, "FAIL: no <ring> argument in '%s'\n",
36
if (ring > 3 || ring < 0) {
37
fprintf(stderr, "FAIL: out of range (0-3)\n");
40
if (iopl(ring) == -1) {
41
fprintf(stderr, "FAIL: iopl failed - %s\n",