]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Clarify discussion of privilege requirements.
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 26 Nov 2006 04:13:44 +0000 (04:13 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 26 Nov 2006 04:13:44 +0000 (04:13 +0000)
Added ENOMEM to ERRORS.

man2/ioperm.2

index 6103c108af8e4d9e19a73f1a8a7bb9e99892bbfa..5b470567e4ca980cce410bf393a1bd4d75d6b327 100644 (file)
@@ -44,20 +44,22 @@ ioperm \- set port input/output permissions
 .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
@@ -77,19 +79,20 @@ or
 .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> .