aboutsummaryrefslogtreecommitdiff
path: root/documentation/manual-pages/ja/man2/fhopen.2
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/manual-pages/ja/man2/fhopen.2')
-rw-r--r--documentation/manual-pages/ja/man2/fhopen.2143
1 files changed, 143 insertions, 0 deletions
diff --git a/documentation/manual-pages/ja/man2/fhopen.2 b/documentation/manual-pages/ja/man2/fhopen.2
new file mode 100644
index 0000000000..5a58241d47
--- /dev/null
+++ b/documentation/manual-pages/ja/man2/fhopen.2
@@ -0,0 +1,143 @@
+.\" %NetBSD: fhopen.2,v 1.1 1999/06/30 01:32:15 wrstuden Exp %
+.\"
+.\" Copyright (c) 1999 National Aeronautics & Space Administration
+.\" All rights reserved.
+.\"
+.\" This software was written by William Studenmund of the
+.\" Numerical Aerospace Simulation Facility, NASA Ames Research Center.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the National Aeronautics & Space Administration
+.\" nor the names of its contributors may be used to endorse or promote
+.\" products derived from this software without specific prior written
+.\" permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
+.\" UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" %FreeBSD: src/lib/libc/sys/fhopen.2,v 1.15 2002/12/27 12:15:29 schweikh Exp %
+.\" $FreeBSD$
+.\"
+.Dd June 29, 1999
+.Dt FHOPEN 2
+.Os
+.Sh 名称
+.Nm fhopen ,
+.Nm fhstat ,
+.Nm fhstatfs
+.Nd ファイルハンドルによるファイルアクセス
+.Sh ライブラリ
+.Lb libc
+.Sh 書式
+.In sys/param.h
+.In sys/mount.h
+.In sys/stat.h
+.Ft int
+.Fn fhopen "const fhandle_t *fhp" "int flags"
+.Ft int
+.Fn fhstat "const fhandle_t *fhp" "struct stat *sb"
+.Ft int
+.Fn fhstatfs "const fhandle_t *fhp" "struct statfs *buf"
+.Sh 解説
+これらのシステムコールはファイルハンドル
+.Fa fhp
+で渡されたファイルにアクセスする手段を提供します。
+この方法はディレクトリのアクセス制限をバイパスするので、
+これらのシステムコールの使用はスーパユーザに限定されています。
+.Pp
+.Fn fhopen
+システムコールは
+.Fa fhp
+が参照するファイルを
+.Fa flags
+で指定にしたがって読取り/書込み/読み書き用にオープンし、
+呼び出したプロセスにファイル記述子を返します。
+.Fa flags
+引数は、
+.Xr open 2
+システムコールで使われる各種フラグの
+.Em or
+をとって指定します。
+ただし、フラグのうち
+.Dv O_CREAT
+は使えません。
+.Pp
+.Fn fhstat
+と
+.Fn fhstatfs
+システムコールはオープンされたファイルではなく、
+.Fa fhp
+によって指し示されたファイルの情報を返すことを除いて
+.Xr fstat 2
+と
+.Xr fstatfs 2
+呼び出しと同等の機能を提供します。
+.Sh 戻り値
+処理が正常に完了すると、
+.Fn fhopen
+はオープンされたファイルの記述子を返します。
+そうでない場合は -1 が返され、エラーを示すために
+.Va errno
+が設定されます。
+.Pp
+.Rv -std fhstat fhstatfs
+.Sh エラー
+.Xr open 2 ,
+.Xr fstat 2 ,
+.Xr fstatfs 2
+のそれぞれの返すエラーに加えて
+.Fn fhopen ,
+.Fn fhstat ,
+.Fn fhstatfs
+は次のエラーを返します:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Fn fhopen
+が
+.Dv O_CREAT
+をセットされて呼び出されました。
+.It Bq Er ESTALE
+ファイルハンドル
+.Fa fhp
+はもう有効ではありません。
+.El
+.Sh 関連項目
+.Xr fstat 2 ,
+.Xr fstatfs 2 ,
+.Xr getfh 2 ,
+.Xr open 2
+.Sh 歴史
+関数
+.Fn fhopen ,
+.Fn fhstat ,
+および
+.Fn fhstatfs
+システムコールは
+.Nx 1.5
+ではじめて登場しました。
+.An Alfred Perlstein
+が
+.Fx 4.0
+に移植しました。
+.Sh 作者
+このマニュアルページは
+.An William Studenmund
+によって
+.Nx
+用に書かれました。