2 .\" Extended attributes system calls manual pages
4 .\" Copyright (C) Andreas Gruenbacher, February 2001
5 .\" Copyright (C) Silicon Graphics Inc, September 2001
7 .\" This is free documentation; you can redistribute it and/or
8 .\" modify it under the terms of the GNU General Public License as
9 .\" published by the Free Software Foundation; either version 2 of
10 .\" the License, or (at your option) any later version.
12 .\" The GNU General Public License's references to "object code"
13 .\" and "executables" are to be interpreted as the output of any
14 .\" document formatting or typesetting system, including
15 .\" intermediate and printed output.
17 .\" This manual is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 .\" GNU General Public License for more details.
22 .\" You should have received a copy of the GNU General Public
23 .\" License along with this manual; if not, write to the Free
24 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
27 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
28 .\" all rights reserved.
29 .\" Translated Tue Jul 8 02:47:19 JST 2003
30 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"WORD: extended attributes 拡張属性
33 .\"WORD: namespace 名前空間
35 .TH GETXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual"
37 .\"O getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value
39 getxattr, lgetxattr, fgetxattr \- 拡張属性の値を取得する
44 .B #include <sys/types.h>
45 .B #include <attr/xattr.h>
47 .BI "ssize_t getxattr(const char\ *" path ", const char\ *" name ,
48 .BI " void\ *" value ", size_t " size );
49 .BI "ssize_t lgetxattr(const char\ *" path ", const char\ *" name ,
50 .BI " void\ *" value ", size_t " size );
51 .BI "ssize_t fgetxattr(int " fd ", const char\ *" name ,
52 .BI " void\ *" value ", size_t " size );
57 .\"O Extended attributes are
60 .\"O pairs associated with inodes (files, directories, symbolic links, etc.).
61 .\"O They are extensions to the normal attributes which are associated
62 .\"O with all inodes in the system (i.e., the
65 .\"O A complete overview of extended attributes concepts can be found in
67 拡張属性は、inode (ファイル、ディレクトリ、シンボリックリンク等) に
72 これらは、システム上のすべての inode に関連付けられた通常の属性
82 .\"O of the extended attribute identified by
84 .\"O and associated with the given
86 .\"O in the file system.
87 .\"O The length of the attribute
102 .\"O .BR lgetxattr ()
104 .\"O .BR getxattr (),
105 .\"O except in the case of a symbolic link, where the link itself is
106 .\"O interrogated, not the file that it refers to.
110 と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
111 ではなく、リンクそのものの情報を取得する点だけが異なる。
113 .\"O .BR fgetxattr ()
115 .\"O .BR getxattr (),
116 .\"O only the open file referred to by
120 .\"O is interrogated in place of
129 で参照されたオープン済みファイルの情報だけを取得する点が異なる
135 .\"O An extended attribute
137 .\"O is a simple null-terminated string.
138 .\"O The name includes a namespace prefix; there may be several, disjoint
139 .\"O namespaces associated with an individual inode.
140 .\"O The value of an extended attribute is a chunk of arbitrary textual or
141 .\"O binary data of specified length.
144 は普通の NULL 終端された文字列である。
145 名前には、名前空間を表す接頭辞 (prefix) が含まれる;
146 個々の inode に対して、互いに独立な名前空間が複数あってもよい。
147 拡張属性の値は、ある一定の長さの任意のテキスト・データまたは
150 .\"O An empty buffer of
152 .\"O zero can be passed into these calls to return the current size of the
153 .\"O named extended attribute, which can be used to estimate the size of a
154 .\"O buffer which is sufficiently large to hold the value associated with
155 .\"O the extended attribute.
157 に 0 を指定して空のバッファをこれらのシステムコールに渡すことができ、
158 この場合には指定された名前の拡張属性の現在のサイズが返される。
159 この方法は、拡張属性の値を保持するのに十分な大きさのバッファ・サイズを
162 .\"O The interface is designed to allow guessing of initial buffer
163 .\"O sizes, and to enlarge buffers when the return value indicates
164 .\"O that the buffer provided was too small.
165 このシステムコール・インタフェースは、初期バッファのサイズの推測をしたり、
166 与えられたバッファが小さすぎたことを返り値で知らせることでバッファを大きく
168 .\"O .SH RETURN VALUE
170 .\"O On success, a positive number is returned indicating the size of the
171 .\"O extended attribute value.
172 .\"O On failure, \-1 is returned and
174 .\"O is set appropriately.
175 成功した場合、拡張属性の値の長さを表す正の数が返される。
180 .\"O If the named attribute does not exist, or the process has no access to
185 指定された名前の属性が存在しない場合、またはプロセスがその属性にアクセス
196 .\"O buffer is too small to hold the result,
203 が結果を保持するのに十分な大きさでない場合、
209 .\"O If extended attributes are not supported by the file system, or are disabled,
213 拡張属性がそのファイルシステムでサポートされていない場合、
220 .\"O The errors documented for the
222 .\"O system call are also applicable here.
224 システムコールの説明に書かれているエラーは
228 .\"O These system calls have been available on Linux since kernel 2.4;
229 .\"O glibc support is provided since version 2.3.
230 これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。
231 glibc でのサポートはバージョン 2.3 以降で行われている。
232 .\"O .SH "CONFORMING TO"
234 .\"O These system calls are Linux-specific.
235 これらのシステムコールは Linux 独自である。
238 .\"O .\" Andreas Gruenbacher,
239 .\"O .\" .RI < a.gruenbacher@computer.org >
240 .\"O .\" and the SGI XFS development team,
241 .\"O .\" .RI < linux-xfs@oss.sgi.com >.
242 .\"O .\" Please send any bug reports or comments to these addresses.
243 .\" Andreas Gruenbacher,
244 .\" .RI < a.gruenbacher@computer.org >
246 .\" .RI < linux-xfs@oss.sgi.com >。
247 .\" バグレポートやコメントは上記のアドレスまで送って下さい。