Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69981 )
Change subject: [NEEDS TEST] util/superiotool: Replace iopl with ioperm ......................................................................
[NEEDS TEST] util/superiotool: Replace iopl with ioperm
The iopl system call is marked as deprecated, and on some distributions the call no longer seems to be implemented. Replace it with ioperm.
Resolves: https://ticket.coreboot.org/issues/440
Change-Id: I6671023b09d22ff38e578d11d04674fb6ae763c9 Signed-off-by: Nicholas Chin nic.c3.14@gmail.com --- M util/superiotool/superiotool.c 1 file changed, 16 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/69981/1
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index ed18c13..f7b96f6 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -324,7 +324,7 @@ if ((io_fd = open("/dev/io", O_RDWR)) < 0) { perror("/dev/io"); #else - if (iopl(3) < 0) { + if (ioperm(0, 65536, 1) < 0) { perror("iopl"); #endif printf("Superiotool must be run as root.\n");