2
* Copyright (C) 2002-2005 Novell/SUSE
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation, version 2 of the
13
#include <sys/types.h>
14
#include <sys/io.h> /* for glibc */
18
int main(int argc, char *argv[])
22
fprintf(stderr, "usage: %s <ring>\n",
27
if ( (ring = strtol(argv[1], NULL, 0)) == 0) {
28
if (errno == EINVAL) {
29
fprintf(stderr, "FAIL: no <ring> argument in '%s'\n",
34
if (ring > 3 || ring < 0) {
35
fprintf(stderr, "FAIL: out of range (0-3)\n");
38
if (iopl(ring) == -1) {
39
fprintf(stderr, "FAIL: iopl failed - %s\n",