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:43:40 JST 2003
30 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"WORD: extended attributes 拡張属性
33 .\"WORD: namespace 名前空間
35 .TH SETXATTR 2 2001-12-31 "Linux" "Linux Programmer's Manual"
37 .\"O setxattr, lsetxattr, fsetxattr \- set an extended attribute value
39 setxattr, lsetxattr, fsetxattr \- 拡張属性の値を設定する
44 .B #include <sys/types.h>
45 .B #include <attr/xattr.h>
47 .BI "int setxattr(const char\ *" path ", const char\ *" name ,
48 .BI " const void\ *" value ", size_t " size ", int " flags );
49 .BI "int lsetxattr(const char\ *" path ", const char\ *" name ,
50 .BI " const void\ *" value ", size_t " size ", int " flags );
51 .BI "int fsetxattr(int " fd ", const char\ *" name ,
52 .BI " const void\ *" value ", size_t " size ", int " flags );
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.
91 .\"O must be specified.
105 .\"O .BR lsetxattr ()
107 .\"O .BR setxattr (),
108 .\"O except in the case of a symbolic link, where the extended attribute is
109 .\"O set on the link itself, not the file that it refers to.
113 と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
114 ではなく、リンクそのものの拡張属性を設定する点だけが異なる。
116 .\"O .BR fsetxattr ()
118 .\"O .BR setxattr (),
119 .\"O only the extended attribute is set on the open file referred to by
132 で参照されたオープン済みファイルの情報だけを設定する点が異なる
138 .\"O An extended attribute name is a simple null-terminated string.
141 .\"O includes a namespace prefix; there may be several, disjoint
142 .\"O namespaces associated with an individual inode.
145 .\"O of an extended attribute is a chunk of arbitrary textual or
146 .\"O binary data of specified length.
148 は普通の NULL 終端された文字列である。
150 には、名前空間を表す接頭辞 (prefix) が含まれる。
151 個々の inode に対して、互いに独立な名前空間が複数あってもよい。
154 は、ある一定の長さの任意のテキスト・データまたは
159 .\"O argument can be used to refine the semantics of the operation.
164 .\"O specifies a pure create, which fails if the named
165 .\"O attribute exists already.
168 指定された名前の属性がすでに存在する場合は失敗する。
169 .\"O .B XATTR_REPLACE
170 .\"O specifies a pure replace operation, which fails if the
171 .\"O named attribute does not already exist.
174 指定された名前の属性がまだ存在しない場合は失敗する。
175 .\"O By default (no flags), the extended attribute will be created if
176 .\"O need be, or will simply replace the value if the attribute exists.
177 デフォルトでは (フラグを指定しない場合)、拡張属性は必要な場合は作成され、
178 属性がすでに存在する場合は属性値の置換を行う。
179 .\"O .SH RETURN VALUE
181 .\"O On success, zero is returned.
182 .\"O On failure, \-1 is returned and
184 .\"O is set appropriately.
192 .\"O is specified, and the attribute exists already,
197 が指定され、かつ属性がすでに存在する場合、
203 .\"O .B XATTR_REPLACE
204 .\"O is specified, and the attribute does not exist,
215 .\"O If there is insufficient space remaining to store the extended attribute,
217 .\"O is set to either
221 .\"O if quota enforcement was the cause.
222 拡張属性を記憶するのに十分なスペースが残っていない場合、
228 (quota による制限が原因の場合) がセットされる。
230 .\"O If extended attributes are not supported by the file system, or are disabled,
234 拡張属性がそのファイルシステムでサポートされていない場合、
241 .\"O The errors documented for the
243 .\"O system call are also applicable here.
245 システムコールの説明に書かれているエラーは
249 .\"O These system calls have been available on Linux since kernel 2.4;
250 .\"O glibc support is provided since version 2.3.
251 これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。
252 glibc でのサポートはバージョン 2.3 以降で行われている。
253 .\"O .SH "CONFORMING TO"
255 .\"O These system calls are Linux-specific.
256 これらのシステムコールは Linux 独自である。
259 .\"O .\" Andreas Gruenbacher,
260 .\"O .\" .RI < a.gruenbacher@computer.org >
261 .\"O .\" and the SGI XFS development team,
262 .\"O .\" .RI < linux-xfs@oss.sgi.com >.
263 .\"O .\" Please send any bug reports or comments to these addresses.
264 .\" Andreas Gruenbacher,
265 .\" .RI < a.gruenbacher@computer.org >
267 .\" .RI < linux-xfs@oss.sgi.com >。
268 .\" バグレポートやコメントは上記のアドレスまで送って下さい。