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 04:17:12 JST 2003
30 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"WORD: extended attributes 拡張属性
33 .\"WORD: namespace 名前空間
35 .TH LISTXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual"
37 .\"O listxattr, llistxattr, flistxattr \- list extended attribute names
39 listxattr, llistxattr, flistxattr \- 拡張属性の名前リストを得る
44 .B #include <sys/types.h>
45 .B #include <attr/xattr.h>
47 .BI "ssize_t listxattr(const char\ *" path ", char\ *" list \
49 .BI "ssize_t llistxattr(const char\ *" path ", char\ *" list \
51 .BI "ssize_t flistxattr(int " fd ", char\ *" list ", size_t " size );
56 .\"O Extended attributes are name:value
57 .\"O pairs associated with inodes (files, directories, symbolic links, etc.).
58 .\"O They are extensions to the normal attributes which are associated
59 .\"O with all inodes in the system (i.e., the
62 .\"O A complete overview of extended attributes concepts can be found in
64 拡張属性は、inode (ファイル、ディレクトリ、シンボリックリンク等) に
69 これらは、システム上のすべての inode に関連付けられた通常の属性
79 .\"O of extended attribute names associated with the given
81 .\"O in the file system.
82 .\"O The list is the set of (null-terminated) names, one after the other.
83 .\"O Names of extended attributes to which the calling process does not
84 .\"O have access may be omitted from the list.
85 .\"O The length of the attribute name
92 リストは名前の集合で、 NULL 終端された文字列が連続して並んでいる。
93 呼び出したプロセスがアクセスする権限のない拡張属性の名前は、
98 .\"O .BR llistxattr ()
100 .\"O .BR listxattr (),
101 .\"O except in the case of a symbolic link, where the list of names of
102 .\"O extended attributes associated with the link itself is retrieved,
103 .\"O not the file that it refers to.
107 と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
108 ではなく、リンクそのものの拡張属性の名前リストを取得する点だけが異なる。
110 .\"O .BR flistxattr ()
112 .\"O .BR listxattr (),
113 .\"O only the open file referred to by
117 .\"O is interrogated in place of
126 で参照されたオープン済みファイルの情報だけを取得する点が異なる
132 .\"O A single extended attribute
134 .\"O is a simple null-terminated string.
135 .\"O The name includes a namespace prefix; there may be several, disjoint
136 .\"O namespaces associated with an individual inode.
139 は普通の NULL 終端された文字列である。
140 名前には、名前空間を表す接頭辞 (prefix) が含まれる;
141 個々の inode に対して、互いに独立な名前空間が複数あってもよい。
143 .\"O An empty buffer of
145 .\"O zero can be passed into these calls to return the current size of the
146 .\"O list of extended attribute names, which can be used to estimate the
147 .\"O size of a buffer which is sufficiently large to hold the list of names.
149 に 0 を指定して空のバッファをこれらのシステムコールに渡すことができ、
150 この場合には拡張属性の名前リストの現在のサイズが返される。
151 この方法は名前リストを保持するのに十分な大きさのバッファ・サイズを
157 .\"O of names is returned as an unordered array of null-terminated character
158 .\"O strings (attribute names are separated by null bytes (\(aq\\0\(aq)), like this:
161 は、 NULL 終端された文字列の配列 (属性名は NULL バイト (\(aq\\0\(aq)
162 で区切られている) で、各要素は整列されている訳ではない。
168 user.name1\\0system.name1\\0user.name2\\0
173 .\"O Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using
174 .\"O extended attributes, might return a
177 拡張属性を使って POSIX ACL を実装している ext2、ext3、XFS のようなファイル
185 system.posix_acl_access\\0system.posix_acl_default\\0
189 .\"O .SH RETURN VALUE
191 .\"O On success, a positive number is returned indicating the size of the
192 .\"O extended attribute name list.
193 .\"O On failure, \-1 is returned and
195 .\"O is set appropriately.
196 成功した場合、拡張属性の名前リストの長さを表す正の数が返される。
205 .\"O buffer is too small to hold the result,
212 が結果を保持するのに十分な大きさでない場合、
218 .\"O If extended attributes are not supported by the file system, or are disabled,
222 拡張属性がそのファイルシステムでサポートされていない場合、
229 .\"O The errors documented for the
231 .\"O system call are also applicable here.
233 システムコールの説明に書かれているエラーは
237 .\"O These system calls have been available on Linux since kernel 2.4;
238 .\"O glibc support is provided since version 2.3.
239 これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。
240 glibc でのサポートはバージョン 2.3 以降で行われている。
241 .\"O .SH "CONFORMING TO"
243 .\"O These system calls are Linux-specific.
244 これらのシステムコールは Linux 独自である。
247 .\"O .\" Andreas Gruenbacher,
248 .\"O .\" .RI < a.gruenbacher@computer.org >
249 .\"O .\" and the SGI XFS development team,
250 .\"O .\" .RI < linux-xfs@oss.sgi.com >.
251 .\"O .\" Please send any bug reports or comments to these addresses.
252 .\" Andreas Gruenbacher,
253 .\" .RI < a.gruenbacher@computer.org >
254 .\" と the SGI XFS development team,
255 .\" .RI < linux-xfs@oss.sgi.com >。
256 .\" バグレポートやコメントは上記のアドレスまで送って下さい。