OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man2 / fstatat.2
1 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH FSTATAT 2 2013\-07\-21 Linux "Linux Programmer's Manual"
31 .SH 名前
32 fstatat \- ディレクトリファイルディスクリプタから相対的な位置にあるファイルの状態を取得する
33 .SH 書式
34 .nf
35 \fB#include <fcntl.h> /* AT_* 定数の定義 */\fP
36 \fB#include <sys/stat.h>\fP
37 .sp
38 \fBint fstatat(int \fP\fIdirfd\fP\fB, const char *\fP\fIpathname\fP\fB, struct stat *\fP\fIbuf\fP\fB,\fP
39 \fB            int \fP\fIflags\fP\fB);\fP
40 .fi
41 .sp
42 .in -4n
43 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
44 .in
45 .sp
46 \fBfstatat\fP():
47 .PD 0
48 .ad l
49 .RS 4
50 .TP  4
51 glibc 2.10 以降:
52 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
53 .TP 
54 glibc 2.10 より前:
55 _ATFILE_SOURCE
56 .RE
57 .ad
58 .PD
59 .SH 説明
60 \fBfstatat\fP()  システムコールは、この man ページで説明している違いがある以外は、 \fBstat\fP(2)  と全く同じように動作する。
61
62 \fIpathname\fP で指定されるパス名が相対パスである場合、 ファイルディスクリプタ \fIdirfd\fP
63 で参照されるディレクトリからの相対パス名として解釈される (\fBstat\fP(2)
64 では、相対パスは呼び出し元プロセスのカレントワーキングディレクトリからの 相対パスとなる)。
65
66 \fIpathname\fP が相対パスであり、かつ \fIdirfd\fP が特別な値 \fBAT_FDCWD\fP である場合、 \fIpathname\fP は
67 (\fBstat\fP(2)  と同じように) 呼び出し元プロセスの カレントワーキングディレクトリからの相対パス名として解釈される。
68
69 \fIpathname\fP が絶対パスである場合、 \fIdirfd\fP は無視される。
70
71 \fIflags\fP には 0 または以下のフラグの 1 つ以上を論理和 (OR) で指定する。
72 .TP 
73 \fBAT_EMPTY_PATH\fP (since Linux 2.6.39)
74 .\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d
75 If \fIpathname\fP is an empty string, operate on the file referred to by in
76 which case the call operates on the file referred to by \fIdirfd\fP (which may
77 have been obtained using the \fBopen\fP(2)  \fBO_PATH\fP flag).  In this case,
78 \fIdirfd\fP can refer to any type of file, not just a directory.
79
80 .TP 
81 \fBAT_NO_AUTOMOUNT\fP (Linux 2.6.38 以降)
82 \fIpathname\fP がオートマウントポイントのディレクトリの場合、
83 \fIpathname\fP の最後の要素 ("basename") のオートマウントを行わない。
84 このフラグを使うと、(マウント先の場所ではなく) オートマウントポイント
85 自身の属性を収集することができる。
86 ディレクトリをスキャンするようなツールで、オートマウントポイントを
87 含むディレクトリで大量のオートマウントが起こらないようにするのに、
88 このフラグを使うことができる。
89 マウントポイントがすでにマウントされている場合には、
90 \fBAT_NO_AUTOMOUNT\fP フラグは何も効果はない。
91 .TP 
92 \fBAT_SYMLINK_NOFOLLOW\fP
93 \fIpathname\fP がシンボリックリンクの場合は、それを辿るのではなく、 \fBlstat\fP(2)  と同様にリンク自身についての情報を返す
94 (デフォルトでは、 \fBfstatat\fP()  は \fBstat\fP(2)  と同様にシンボリックリンクを辿る)。
95 .SH 返り値
96 成功した場合、 \fBfstatat\fP()  は 0 を返す。 エラーの場合、\-1 が返されて、 \fIerrno\fP にはエラーを示す値が設定される。
97 .SH エラー
98 \fBstat\fP(2)  と同じエラーが \fBfstatat\fP()  でも起こる。 \fBfstatat\fP()  では、その他に以下のエラーが起こる:
99 .TP 
100 \fBEBADF\fP
101 \fIdirfd\fP が有効なファイルディスクリプタでない。
102 .TP 
103 \fBEINVAL\fP
104 \fIflags\fP に不正なフラグ値が指定された。
105 .TP 
106 \fBENOTDIR\fP
107 \fIpathname\fP が相対パスで、かつ \fIdirfd\fP がディレクトリ以外のファイルを参照するファイルディスクリプタである。
108 .SH バージョン
109 \fBfstatat\fP()  は Linux カーネル 2.6.16 で追加された。
110 ライブラリによるサポートは glibc バージョン 2.4 で追加された。
111 .SH 準拠
112 POSIX.1\-2008.  Solaris には、これと同じようなシステムコールが存在する。
113 .SH 注意
114 \fBfstatat\fP()  が必要な理由については、 \fBopenat\fP(2)  を参照すること。
115
116 glibc の \fBfstatat\fP() のラッパー関数が利用するシステムコールとしては、
117 実際には \fBfstatat64\fP() が呼び出される。
118 .SH 関連項目
119 \fBopenat\fP(2), \fBstat\fP(2), \fBpath_resolution\fP(7), \fBsymlink\fP(7),
120 .SH この文書について
121 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
122 である。プロジェクトの説明とバグ報告に関する情報は
123 http://www.kernel.org/doc/man\-pages/ に書かれている。