OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man2 / ioperm.2
1 .\" Copyright (c) 1993 Michael Haardt
2 .\" (michael@moria.de)
3 .\" Fri Apr  2 11:32:09 MET DST 1993
4 .\"
5 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
10 .\"
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
15 .\"
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 .\" GNU General Public License for more details.
20 .\"
21 .\" You should have received a copy of the GNU General Public
22 .\" License along with this manual; if not, see
23 .\" <http://www.gnu.org/licenses/>.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified Sat Jul 24 15:12:05 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified Tue Aug  1 16:27    1995 by Jochen Karrer
28 .\"                              <cip307@cip.physik.uni-wuerzburg.de>
29 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
30 .\" Modified Mon Feb 15 17:28:41 CET 1999 by Andries E. Brouwer <aeb@cwi.nl>
31 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
32 .\"     Added notes on capability requirements
33 .\"
34 .\"*******************************************************************
35 .\"
36 .\" This file was generated with po4a. Translate the source file.
37 .\"
38 .\"*******************************************************************
39 .TH IOPERM 2 2013\-03\-12 Linux "Linux Programmer's Manual"
40 .SH 名前
41 ioperm \- ポートの入出力許可を設定する
42 .SH 書式
43 \fB#include <unistd.h>\fP /* for libc5 */
44 .br
45 \fB#include <sys/io.h>\fP /* for glibc */
46 .sp
47 \fBint ioperm(unsigned long \fP\fIfrom\fP\fB, unsigned long \fP\fInum\fP\fB, int
48 \fP\fIturn_on\fP\fB);\fP
49 .SH 説明
50 \fBioperm\fP()  sets the port access permission bits for the calling thread for
51 \fInum\fP bits starting from port address \fIfrom\fP.  If \fIturn_on\fP is nonzero,
52 then permission for the specified bits is enabled; otherwise it is
53 disabled.  If \fIturn_on\fP is nonzero, the calling thread must be privileged
54 (\fBCAP_SYS_RAWIO\fP).
55
56 Before Linux 2.6.8, only the first 0x3ff I/O ports could be specified in
57 this manner.  For more ports, the \fBiopl\fP(2)  system call had to be used
58 (with a \fIlevel\fP argument of 3).  Since Linux 2.6.8, 65,536 I/O ports can be
59 specified.
60
61 Permissions are not inherited by the child created by \fBfork\fP(2); following
62 a \fBfork\fP(2)  the child must turn on those permissions that it needs.
63 Permissions are preserved across \fBexecve\fP(2); this is useful for giving
64 port access permissions to unprivileged programs.
65
66 このシステムコールはほとんど i386 アーキテクチャのためだけのものである。 その他の多くのアーキテクチャでは存在しないか、常にエラーを返す。
67 .SH 返り値
68 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
69 .SH エラー
70 .TP 
71 \fBEINVAL\fP
72 \fIfrom\fP または \fInum\fP の値が不正である。
73 .TP 
74 \fBEIO\fP
75 (PowerPC で) このシステムコールはサポートしていない。
76 .TP 
77 \fBENOMEM\fP
78 .\" Could not allocate I/O bitmap.
79 メモリ不足。
80 .TP 
81 \fBEPERM\fP
82 The calling thread has insufficient privilege.
83 .SH 準拠
84 \fBioperm\fP()  は Linux 特有の関数であり、移植を意図したプログラムで 使用してはならない。
85 .SH 注意
86 The \fI/proc/ioports\fP file shows the I/O ports that are currently allocated
87 on the system.
88
89 libc5 ではシステムコールとして扱い \fI<unistd.h>\fP にプロトタイプが存在している。 glibc1
90 にはプロトタイプは存在しない。 glibc2 は \fI<sys/io.h>\fP と \fI<sys/perm.h>\fP
91 の両方にプロトタイプを持っている。 後者は i386 のみで利用可能なので、使用すべきではない。
92 .SH 関連項目
93 \fBiopl\fP(2), \fBoutb\fP(2), \fBcapabilities\fP(7)
94 .SH この文書について
95 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
96 である。プロジェクトの説明とバグ報告に関する情報は
97 http://www.kernel.org/doc/man\-pages/ に書かれている。