.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1993 Michael Haardt .\" (michael@moria.de) .\" Fri Apr 2 11:32:09 MET DST 1993 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified Sat Jul 24 15:12:05 1993 by Rik Faith .\" Modified Tue Aug 1 16:27 1995 by Jochen Karrer .\" .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond .\" Modified Mon Feb 15 17:28:41 CET 1999 by Andries E. Brouwer .\" Modified, 27 May 2004, Michael Kerrisk .\" Added notes on capability requirements .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH IOPERM 2 2007\-06\-15 Linux "Linux Programmer's Manual" .SH 名前 ioperm \- ポートの入出力許可を設定する .SH 書式 \fB#include \fP /* for libc5 */ .br \fB#include \fP /* for glibc */ .sp \fBint ioperm(unsigned long \fP\fIfrom\fP\fB, unsigned long \fP\fInum\fP\fB, int \fP\fIturn_on\fP\fB);\fP .SH 説明 \fBioperm\fP() は、引き数 \fIfrom\fP の I/O ポートアドレスから \fInum\fP バイト分の領域に対する、呼び出し元プロセスの アクセス許可ビットを、\fIturn_on\fP に設定する。 \fIturn_on\fP が 0 以外の場合、呼び出し元プロセスは特権 (\fBCAP_SYS_RAWIO\fP) を持っていなければならない。 .\" FIXME is the following ("Only the first 0x3ff I/O ports can be .\" specified in this manner") still true? Looking at changes in .\" include/asm-i386/processor.h between 2.4 and 2.6 suggests .\" that the limit is different in 2.6. この方法で設定できるのは 0x3ff 番地までの I/Oポートに限られる。 これよりも大きなアドレスのポートに対しては \fBiopl\fP(2) 関数を使わなければならない。 アクセス権は \fBfork\fP(2) で作成された子プロセスには継承されない。 \fBexecve\fP(2) の前後でアクセス権は保存される。この機能は 非特権プログラムにポートへのアクセス権を 与えるのに使用できる。 このシステムコールはほとんど i386 アーキテクチャのためだけのものである。 その他の多くのアーキテクチャでは存在しないか、常にエラーを返す。 .SH 返り値 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEINVAL\fP \fIfrom\fP または \fInum\fP の値が不正である。 .TP \fBEIO\fP (PowerPC で) このシステムコールはサポートしていない。 .TP \fBENOMEM\fP .\" Could not allocate I/O bitmap. メモリ不足。 .TP \fBEPERM\fP 呼び出し元プロセスに十分な権限がなかった。 .SH 準拠 \fBioperm\fP() は Linux 特有の関数であり、移植を意図したプログラムで 使用してはならない。 .SH 注意 libc5 ではシステムコールとして扱い \fI\fP にプロトタイプが存在している。 glibc1 にはプロトタイプは存在しない。 glibc2 は \fI\fP と \fI\fP の両方にプロトタイプを持っている。 後者は i386 のみで利用可能なので、使用すべきではない。 .SH 関連項目 \fBiopl\fP(2), \fBcapabilities\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。