#include <stdio.h>
#include <sys/io.h>
int main(int argc, char **argv)
{
int addr = 0x378;
if(ioperm(addr, 3, 1) == -1) {
perror("ioperm");
exit(1);
}
printf("0x%02x\n", inb(addr + 1));
}
The ioperm() only works if you're root.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/