.sp
.BI "int ioperm(unsigned long " from ", unsigned long " num ", int " turn_on );
.SH DESCRIPTION
-\fBIoperm\fP sets the port access permission bits for the process for
+\fBioperm\fP() sets the port access permission bits for the process for
\fInum\fP bytes starting from port address \fBfrom\fP to the value
-\fBturn_on\fP. The use of \fBioperm\fP() requires root privileges.
+\fBturn_on\fP.
+If \fBturn_on\fP is non-zero, the calling process must be privileged
+.RM ( CAP_SYS_RAWIO ).
-Only the first 0x3ff I/O ports can be specified in this manner. For more
-ports, the
+Only the first 0x3ff I/O ports can be specified in this manner.
+For more ports, the
.BR iopl ()
function must be used.
Permissions are not inherited on
.BR fork (),
but on
.BR exec ()
-they are. This is
-useful for giving port access permissions to non-privileged tasks.
+they are.
+This is useful for giving port access permissions to non-privileged tasks.
This call is mostly for the i386 architecture.
On many other architectures it does not exist or will always
.B EIO
(on ppc) This call is not supported.
.TP
+.B ENOMEM
+.\" Could not allocate I/O bitmap.
+Out of memory.
+.TP
.B EPERM
-The calling process has insufficient privilege to call
-.BR ioperm ();
-the
-.B CAP_SYS_RAWIO
-capability is required.
+The calling process has insufficient privilege.
.SH "CONFORMING TO"
\fBioperm\fP() is Linux specific and should not be used in programs
intended to be portable.
.SH NOTES
Libc5 treats it as a system call and has a prototype in
.IR <unistd.h> .
-Glibc1 does not have a prototype. Glibc2 has a prototype both in
+Glibc1 does not have a prototype.
+Glibc2 has a prototype both in
.I <sys/io.h>
and in
.IR <sys/perm.h> .