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 getxattr, lgetxattr, fgetxattr \- 拡張属性の値を取得する
41 .B #include <sys/types.h>
42 .B #include <attr/xattr.h>
44 .BI "ssize_t getxattr(const char\ *" path ", const char\ *" name ,
45 .BI " void\ *" value ", size_t " size );
46 .BI "ssize_t lgetxattr(const char\ *" path ", const char\ *" name ,
47 .BI " void\ *" value ", size_t " size );
48 .BI "ssize_t fgetxattr(int " fd ", const char\ *" name ,
49 .BI " void\ *" value ", size_t " size );
53 拡張属性は、inode (ファイル、ディレクトリ、シンボリックリンク等) に
58 これらは、システム上のすべての inode に関連付けられた通常の属性
80 と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
81 ではなく、リンクそのものの情報を取得する点だけが異なる。
90 で参照されたオープン済みファイルの情報だけを取得する点が異なる
98 は普通の NULL 終端された文字列である。
99 名前には、名前空間を表す接頭辞 (prefix) が含まれる;
100 個々の inode に対して、互いに独立な名前空間が複数あってもよい。
101 拡張属性の値は、ある一定の長さの任意のテキスト・データまたは
105 に 0 を指定して空のバッファをこれらのシステムコールに渡すことができ、
106 この場合には指定された名前の拡張属性の現在のサイズが返される。
107 この方法は、拡張属性の値を保持するのに十分な大きさのバッファ・サイズを
110 このシステムコール・インタフェースは、初期バッファのサイズの推測をしたり、
111 与えられたバッファが小さすぎたことを返り値で知らせることでバッファを大きく
114 成功した場合、拡張属性の値の長さを表す正の数が返される。
119 指定された名前の属性が存在しない場合、またはプロセスがその属性にアクセス
129 が結果を保持するのに十分な大きさでない場合、
135 拡張属性がそのファイルシステムでサポートされていない場合、
143 システムコールの説明に書かれているエラーは
146 これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。
147 glibc でのサポートはバージョン 2.3 以降で行われている。
149 これらのシステムコールは Linux 独自である。
151 .\" Andreas Gruenbacher,
152 .\" .RI < a.gruenbacher@computer.org >
154 .\" .RI < linux-xfs@oss.sgi.com >。
155 .\" バグレポートやコメントは上記のアドレスまで送って下さい。