.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH IOPERM 2 2016-03-15 "Linux" "Linux Programmer's Manual"
+.TH IOPERM 2 2017-09-15 "Linux" "Linux Programmer's Manual"
.SH NAME
ioperm \- set port input/output permissions
.SH SYNOPSIS
.B #include <sys/io.h>
/* for glibc */
-.sp
+.PP
.BI "int ioperm(unsigned long " from ", unsigned long " num ", int " turn_on );
.SH DESCRIPTION
.BR ioperm ()
.I turn_on
is nonzero, the calling thread must be privileged
.RB ( CAP_SYS_RAWIO ).
-
+.PP
Before Linux 2.6.8,
only the first 0x3ff I/O ports could be specified in this manner.
For more ports, the
.I level
argument of 3).
Since Linux 2.6.8, 65,536 I/O ports can be specified.
-
+.PP
Permissions are inherited by the child created by
.BR fork (2)
(but see NOTES).
.BR execve (2);
this is useful for giving port access permissions to unprivileged
programs.
-
+.PP
This call is mostly for the i386 architecture.
On many other architectures it does not exist or will always
return an error.
The
.I /proc/ioports
file shows the I/O ports that are currently allocated on the system.
-
+.PP
Before Linux 2.4,
permissions were not inherited by a child created by
.BR fork (2).
-
+.PP
Glibc has an
.BR ioperm ()
prototype both in