OSDN Git Service

(split) LDP: Update drafts based on LDP v3.40.
[linuxjm/LDP_man-pages.git] / draft / man2 / getxattr.2
index cbce270..81f04cd 100644 (file)
 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
 .\" USA.
 .\"
-.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
-.\"         all rights reserved.
-.\" Translated Tue Jul  8 02:47:19 JST 2003
-.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"*******************************************************************
 .\"
-.\"WORD:       extended attributes     ³Èĥ°À­
-.\"WORD:       namespace               Ì¾Á°¶õ´Ö
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH GETXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value
-.SH Ì¾Á°
-getxattr, lgetxattr, fgetxattr \- ³Èĥ°À­¤ÎÃͤò¼èÆÀ¤¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH GETXATTR 2 2001\-12\-01 Linux "Linux Programmer's Manual"
+.SH 名前
+getxattr, lgetxattr, fgetxattr \- 拡張属性の値を取得する
+.SH 書式
 .fam C
 .nf
-.B #include <sys/types.h>
-.B #include <attr/xattr.h>
+\fB#include <sys/types.h>\fP
+\fB#include <attr/xattr.h>\fP
 .sp
-.BI "ssize_t getxattr(const char\ *" path ", const char\ *" name ,
-.BI "                 void\ *" value ", size_t " size );
-.BI "ssize_t lgetxattr(const char\ *" path ", const char\ *" name ,
-.BI "                 void\ *" value ", size_t " size );
-.BI "ssize_t fgetxattr(int " fd ", const char\ *" name ,
-.BI "                 void\ *" value ", size_t " size );
+\fBssize_t getxattr(const char\ *\fP\fIpath\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB                 void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBssize_t lgetxattr(const char\ *\fP\fIpath\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB                 void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBssize_t fgetxattr(int \fP\fIfd\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB                 void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
 .fi
 .fam T
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O Extended attributes are
-.\"O .IR name :\c
-.\"O .I value
-.\"O pairs associated with inodes (files, directories, symbolic links, etc.).
-.\"O They are extensions to the normal attributes which are associated
-.\"O with all inodes in the system (i.e., the
-.\"O .BR stat (2)
-.\"O data).
-.\"O A complete overview of extended attributes concepts can be found in
-.\"O .BR attr (5).
-³Èĥ°À­¤Ï¡¢inode (¥Õ¥¡¥¤¥ë¡¢¥Ç¥£¥ì¥¯¥È¥ê¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯Åù) ¤Ë
-´ØÏ¢ÉÕ¤±¤é¤ì¤¿
-.IR name :\c
-.I value
-¤ÎÂФǤ¢¤ë¡£
-¤³¤ì¤é¤Ï¡¢¥·¥¹¥Æ¥à¾å¤Î¤¹¤Ù¤Æ¤Î inode ¤Ë´ØÏ¢ÉÕ¤±¤é¤ì¤¿Ä̾ï¤Î°À­
-.RB ( stat (2)
-¤¬ÊÖ¤¹¥Ç¡¼¥¿) ¤ò³ÈÄ¥¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
-³Èĥ°À­¤Î¥³¥ó¥»¥×¥È¤Ï
-.BR attr (5)
-¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
+.SH 説明
+拡張属性は、inode (ファイル、ディレクトリ、シンボリックリンク等) に 関連付けられた \fIname\fP:\fIvalue\fP の対である。
+これらは、システム上のすべての inode に関連付けられた通常の属性 (\fBstat\fP(2)  が返すデータ) を拡張するものである。
+拡張属性のコンセプトは \fBattr\fP(5)  に書かれている。
 .PP
-.\"O .BR getxattr ()
-.\"O retrieves the
-.\"O .I value
-.\"O of the extended attribute identified by
-.\"O .I name
-.\"O and associated with the given
-.\"O .I path
-.\"O in the file system.
-.\"O The length of the attribute
-.\"O .I value
-.\"O is returned.
-.BR getxattr ()
-¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÆâ¤Î»ØÄꤵ¤ì¤¿
-.I path
-¤ËÂбþ¤¹¤ë¡¢Ì¾Á°
-.I name
-¤Î³Èĥ°À­¤Î
-.I value
-(ÃÍ) ¤ò¼èÆÀ¤¹¤ë¡£
-°À­
-.I value
-¤ÎŤµ¤¬ÊÖ¤µ¤ì¤ë¡£
+\fBgetxattr\fP()  は、ファイルシステム内の指定された \fIpath\fP に対応する、名前 \fIname\fP の拡張属性の \fIvalue\fP
+(値) を取得する。 属性 \fIvalue\fP の長さが返される。
 .PP
-.\"O .BR lgetxattr ()
-.\"O is identical to
-.\"O .BR getxattr (),
-.\"O except in the case of a symbolic link, where the link itself is
-.\"O interrogated, not the file that it refers to.
-.BR lgetxattr ()
-¤Ï
-.BR getxattr ()
-¤ÈƱ¤¸¤À¤¬¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¾ì¹ç¤Ë¡¢¥ê¥ó¥¯¤¬»²¾È¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë
-¤Ç¤Ï¤Ê¤¯¡¢¥ê¥ó¥¯¤½¤Î¤â¤Î¤Î¾ðÊó¤ò¼èÆÀ¤¹¤ëÅÀ¤À¤±¤¬°Û¤Ê¤ë¡£
+\fBlgetxattr\fP()  は \fBgetxattr\fP()  と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
+ではなく、リンクそのものの情報を取得する点だけが異なる。
 .PP
-.\"O .BR fgetxattr ()
-.\"O is identical to
-.\"O .BR getxattr (),
-.\"O only the open file referred to by
-.\"O .I fd
-.\"O (as returned by
-.\"O .BR open (2))
-.\"O is interrogated in place of
-.\"O .IR path .
-.BR fgetxattr ()
-¤Ï
-.BR getxattr ()
-¤ÈƱ¤¸¤À¤¬¡¢
-.I path
-¤ÎÂå¤ï¤ê¤Ë
-.I fd
-¤Ç»²¾È¤µ¤ì¤¿¥ª¡¼¥×¥óºÑ¤ß¥Õ¥¡¥¤¥ë¤Î¾ðÊó¤À¤±¤ò¼èÆÀ¤¹¤ëÅÀ¤¬°Û¤Ê¤ë
-.RI ( fd
-¤Ï
-.BR open (2)
-¤Ë¤è¤Ã¤ÆÊÖ¤µ¤ì¤ë)¡£
+\fBfgetxattr\fP()  は \fBgetxattr\fP()  と同じだが、 \fIpath\fP の代わりに \fIfd\fP
+で参照されたオープン済みファイルの情報だけを取得する点が異なる (\fIfd\fP は \fBopen\fP(2)  によって返される)。
 .PP
-.\"O An extended attribute
-.\"O .I name
-.\"O is a simple null-terminated string.
-.\"O The name includes a namespace prefix; there may be several, disjoint
-.\"O namespaces associated with an individual inode.
-.\"O The value of an extended attribute is a chunk of arbitrary textual or
-.\"O binary data of specified length.
-³Èĥ°À­¤Î̾Á°
-.I name
-¤ÏÉáÄ̤ΠNULL ½ªÃ¼¤µ¤ì¤¿Ê¸»úÎó¤Ç¤¢¤ë¡£
-̾Á°¤Ë¤Ï¡¢Ì¾Á°¶õ´Ö¤òɽ¤¹ÀÜƬ¼­ (prefix) ¤¬´Þ¤Þ¤ì¤ë;
-¸Ä¡¹¤Î inode ¤ËÂФ·¤Æ¡¢¸ß¤¤¤ËÆÈΩ¤Ê̾Á°¶õ´Ö¤¬Ê£¿ô¤¢¤Ã¤Æ¤â¤è¤¤¡£
-³Èĥ°À­¤ÎÃͤϡ¢¤¢¤ë°ìÄê¤ÎŤµ¤ÎǤ°Õ¤Î¥Æ¥­¥¹¥È¡¦¥Ç¡¼¥¿¤Þ¤¿¤Ï
-¥Ð¥¤¥Ê¥ê¡¦¥Ç¡¼¥¿¤Î½¸¹ç¤Ç¤¢¤ë¡£
+拡張属性の名前 \fIname\fP は普通の NULL 終端された文字列である。 名前には、名前空間を表す接頭辞 (prefix) が含まれる; 個々の
+inode に対して、互いに独立な名前空間が複数あってもよい。 拡張属性の値は、ある一定の長さの任意のテキスト・データまたは
+バイナリ・データの集合である。
 .PP
-.\"O An empty buffer of
-.\"O .I size
-.\"O zero can be passed into these calls to return the current size of the
-.\"O named extended attribute, which can be used to estimate the size of a
-.\"O buffer which is sufficiently large to hold the value associated with
-.\"O the extended attribute.
-.I size
-¤Ë 0 ¤ò»ØÄꤷ¤Æ¶õ¤Î¥Ð¥Ã¥Õ¥¡¤ò¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÅϤ¹¤³¤È¤¬¤Ç¤­¡¢
-¤³¤Î¾ì¹ç¤Ë¤Ï»ØÄꤵ¤ì¤¿Ì¾Á°¤Î³Èĥ°À­¤Î¸½ºß¤Î¥µ¥¤¥º¤¬ÊÖ¤µ¤ì¤ë¡£
-¤³¤ÎÊýË¡¤Ï¡¢³Èĥ°À­¤ÎÃͤòÊÝ»ý¤¹¤ë¤Î¤Ë½½Ê¬¤ÊÂ礭¤µ¤Î¥Ð¥Ã¥Õ¥¡¡¦¥µ¥¤¥º¤ò
-¸«ÀѤâ¤ë¤Î¤Ë»È¤¦¤³¤È¤¬¤Ç¤­¤ë¡¢
+\fIsize\fP に 0 を指定して空のバッファをこれらのシステムコールに渡すことができ、 この場合には指定された名前の拡張属性の現在のサイズが返される。
+この方法は、拡張属性の値を保持するのに十分な大きさのバッファ・サイズを 見積もるのに使うことができる、
 .PP
-.\"O The interface is designed to allow guessing of initial buffer
-.\"O sizes, and to enlarge buffers when the return value indicates
-.\"O that the buffer provided was too small.
-¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¡¦¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï¡¢½é´ü¥Ð¥Ã¥Õ¥¡¤Î¥µ¥¤¥º¤Î¿ä¬¤ò¤·¤¿¤ê¡¢
-Í¿¤¨¤é¤ì¤¿¥Ð¥Ã¥Õ¥¡¤¬¾®¤µ¤¹¤®¤¿¤³¤È¤òÊÖ¤êÃͤÇÃΤ餻¤ë¤³¤È¤Ç¥Ð¥Ã¥Õ¥¡¤òÂ礭¤¯
-¤·¤¿¤ê¤Ç¤­¤ë¤è¤¦¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£
-.\"O .SH RETURN VALUE
-.SH ÊÖ¤êÃÍ
-.\"O On success, a positive number is returned indicating the size of the
-.\"O extended attribute value.
-.\"O On failure, \-1 is returned and
-.\"O .I errno
-.\"O is set appropriately.
-À®¸ù¤·¤¿¾ì¹ç¡¢³Èĥ°À­¤ÎÃͤÎŤµ¤òɽ¤¹Àµ¤Î¿ô¤¬ÊÖ¤µ¤ì¤ë¡£
-¼ºÇÔ¤·¤¿¾ì¹ç¡¢ \-1 ¤¬ÊÖ¤µ¤ì¡¢
-.I errno
-¤ËŬÀÚ¤ÊÃͤ¬¥»¥Ã¥È¤µ¤ì¤ë¡£
+このシステムコール・インタフェースは、初期バッファのサイズの推測をしたり、 与えられたバッファが小さすぎたことを返り値で知らせることでバッファを大きく
+したりできるように設計されている。
+.SH 返り値
+成功した場合、拡張属性の値の長さを表す正の数が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。
 .PP
-.\"O If the named attribute does not exist, or the process has no access to
-.\"O this attribute,
-.\"O .I errno
-.\"O is set to
-.\"O .BR ENOATTR .
-»ØÄꤵ¤ì¤¿Ì¾Á°¤Î°À­¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢¤Þ¤¿¤Ï¥×¥í¥»¥¹¤¬¤½¤Î°À­¤Ë¥¢¥¯¥»¥¹
-¤¹¤ë¸¢¸Â¤¬¤Ê¤¤¾ì¹ç¡¢
-.I errno
-¤Ë
-.B ENOATTR
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
+指定された名前の属性が存在しない場合、またはプロセスがその属性にアクセス する権限がない場合、 \fIerrno\fP に \fBENOATTR\fP
+がセットされる。
 .PP
-.\"O If the
-.\"O .I size
-.\"O of the
-.\"O .I value
-.\"O buffer is too small to hold the result,
-.\"O .I errno
-.\"O is set to
-.\"O .B ERANGE .
-.I value
-¥Ð¥Ã¥Õ¥¡¤ÎÂ礭¤µ
-.I size
-¤¬·ë²Ì¤òÊÝ»ý¤¹¤ë¤Î¤Ë½½Ê¬¤ÊÂ礭¤µ¤Ç¤Ê¤¤¾ì¹ç¡¢
-.I errno
-¤Ë
-.B ERANGE
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
+\fIvalue\fP バッファの大きさ \fIsize\fP が結果を保持するのに十分な大きさでない場合、 \fIerrno\fP に \fBERANGE\fP
+がセットされる。
 .PP
-.\"O If extended attributes are not supported by the file system, or are disabled,
-.\"O .I errno
-.\"O is set to
-.\"O .B ENOTSUP .
-³Èĥ°À­¤¬¤½¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
-¤â¤·¤¯¤Ï̵¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢
-.I errno
-¤Ë
-.B ENOTSUP
-¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
+拡張属性がそのファイルシステムでサポートされていない場合、 もしくは無効になっている場合、 \fIerrno\fP に \fBENOTSUP\fP がセットされる。
 .PP
-.\"O The errors documented for the
-.\"O .BR stat (2)
-.\"O system call are also applicable here.
-.BR stat (2)
-¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÎÀâÌÀ¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ï
-¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë¤âŬÍѤµ¤ì¤ë¡£
-.\"O .SH VERSIONS
-.SH ¥Ð¡¼¥¸¥ç¥ó
-.\"O These system calls have been available on Linux since kernel 2.4;
-.\"O glibc support is provided since version 2.3.
-¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë 2.4 °Ê¹ß¤Î Linux ¤ÇÍøÍѤǤ­¤ë¡£
-glibc ¤Ç¤Î¥µ¥Ý¡¼¥È¤Ï¥Ð¡¼¥¸¥ç¥ó 2.3 °Ê¹ß¤Ç¹Ô¤ï¤ì¤Æ¤¤¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-.\"O These system calls are Linux-specific.
-¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£
-.\"O .\" .SH AUTHORS
-.\" .SH Ãø¼Ô
-.\"O .\" Andreas Gruenbacher,
-.\"O .\" .RI < a.gruenbacher@computer.org >
-.\"O .\" and the SGI XFS development team,
-.\"O .\" .RI < linux-xfs@oss.sgi.com >.
-.\"O .\" Please send any bug reports or comments to these addresses.
+\fBstat\fP(2)  システムコールの説明に書かれているエラーは これらのシステムコールにも適用される。
+.SH バージョン
+これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。 glibc でのサポートはバージョン 2.3 以降で行われている。
+.SH 準拠
+.\" .SH AUTHORS
 .\" Andreas Gruenbacher,
 .\" .RI < a.gruenbacher@computer.org >
-.\" ¤È SGI XFS ³«È¯¥Á¡¼¥à,
-.\" .RI < linux-xfs@oss.sgi.com >¡£
-.\" ¥Ð¥°¥ì¥Ý¡¼¥È¤ä¥³¥á¥ó¥È¤Ï¾åµ­¤Î¥¢¥É¥ì¥¹¤Þ¤ÇÁ÷¤Ã¤Æ²¼¤µ¤¤¡£
-.\"O .SH SEE ALSO
-.SH ´ØÏ¢¹àÌÜ
-.BR getfattr (1),
-.BR setfattr (1),
-.BR listxattr (2),
-.BR open (2),
-.BR removexattr (2),
-.BR setxattr (2),
-.BR stat (2),
-.BR attr (5),
-.BR symlink (7)
+.\" and the SGI XFS development team,
+.\" .RI < linux-xfs@oss.sgi.com >.
+.\" Please send any bug reports or comments to these addresses.
+これらのシステムコールは Linux 独自である。
+.SH 関連項目
+\fBgetfattr\fP(1), \fBsetfattr\fP(1), \fBlistxattr\fP(2), \fBopen\fP(2),
+\fBremovexattr\fP(2), \fBsetxattr\fP(2), \fBstat\fP(2), \fBattr\fP(5), \fBsymlink\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。