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 listxattr, llistxattr, flistxattr \- 拡張属性の名前リストを得る
41 .B #include <sys/types.h>
42 .B #include <attr/xattr.h>
44 .BI "ssize_t listxattr(const char\ *" path ", char\ *" list \
46 .BI "ssize_t llistxattr(const char\ *" path ", char\ *" list \
48 .BI "ssize_t flistxattr(int " fd ", char\ *" list ", size_t " size );
52 拡張属性は、inode (ファイル、ディレクトリ、シンボリックリンク等) に
57 これらは、システム上のすべての inode に関連付けられた通常の属性
68 リストは名前の集合で、 NULL 終端された文字列が連続して並んでいる。
69 呼び出したプロセスがアクセスする権限のない拡張属性の名前は、
77 と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
78 ではなく、リンクそのものの拡張属性の名前リストを取得する点だけが異なる。
87 で参照されたオープン済みファイルの情報だけを取得する点が異なる
95 は普通の NULL 終端された文字列である。
96 名前には、名前空間を表す接頭辞 (prefix) が含まれる;
97 個々の inode に対して、互いに独立な名前空間が複数あってもよい。
100 に 0 を指定して空のバッファをこれらのシステムコールに渡すことができ、
101 この場合には拡張属性の名前リストの現在のサイズが返される。
102 この方法は名前リストを保持するのに十分な大きさのバッファ・サイズを
107 は、 NULL 終端された文字列の配列 (属性名は NULL バイト (\(aq\\0\(aq)
108 で区切られている) で、各要素は整列されている訳ではない。
114 user.name1\\0system.name1\\0user.name2\\0
119 拡張属性を使って POSIX ACL を実装している ext2、ext3、XFS のようなファイル
127 system.posix_acl_access\\0system.posix_acl_default\\0
132 成功した場合、拡張属性の名前リストの長さを表す正の数が返される。
140 が結果を保持するのに十分な大きさでない場合、
146 拡張属性がそのファイルシステムでサポートされていない場合、
154 システムコールの説明に書かれているエラーは
157 これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。
158 glibc でのサポートはバージョン 2.3 以降で行われている。
160 これらのシステムコールは Linux 独自である。
162 .\" Andreas Gruenbacher,
163 .\" .RI < a.gruenbacher@computer.org >
164 .\" と the SGI XFS development team,
165 .\" .RI < linux-xfs@oss.sgi.com >。
166 .\" バグレポートやコメントは上記のアドレスまで送って下さい。