OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / listxattr.2
index 5972d74..5438eae 100644 (file)
@@ -1,9 +1,7 @@
-.\"
-.\" Extended attributes system calls manual pages
-.\"
 .\" Copyright (C) Andreas Gruenbacher, February 2001
 .\" Copyright (C) Silicon Graphics Inc, September 2001
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
-.TH LISTXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual"
+.TH LISTXATTR 2 2014-02-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 listxattr, llistxattr, flistxattr \- list extended attribute names
 .SH SYNOPSIS
 .fam C
 .nf
 .B #include <sys/types.h>
-.B #include <attr/xattr.h>
+.B #include <sys/xattr.h>
 .sp
 .BI "ssize_t listxattr(const char\ *" path ", char\ *" list \
 ", size_t " size );
@@ -51,11 +49,14 @@ A complete overview of extended attributes concepts can be found in
 .BR attr (5).
 .PP
 .BR listxattr ()
-retrieves the
-.I list
+retrieves the list
 of extended attribute names associated with the given
 .I path
-in the file system.
+in the filesystem.
+The retrieved list is placed in
+.IR list ,
+a caller-allocated buffer whose size (in bytes) is specified in the argument
+.IR size .
 The list is the set of (null-terminated) names, one after the other.
 Names of extended attributes to which the calling process does not
 have access may be omitted from the list.
@@ -118,33 +119,30 @@ system.posix_acl_access\\0system.posix_acl_default\\0
 .RE
 .fam T
 .SH RETURN VALUE
-On success, a positive number is returned indicating the size of the
+On success, a nonnegative number is returned indicating the size of the
 extended attribute name list.
 On failure, \-1 is returned and
 .I errno
 is set appropriately.
-.PP
-If the
+.SH ERRORS
+.TP
+.B ENOTSUP
+Extended attributes are not supported by the filesystem, or are disabled.
+.TP
+.B ERANGE
+The
 .I size
 of the
 .I list
-buffer is too small to hold the result,
-.I errno
-is set to
-.BR ERANGE .
-.PP
-If extended attributes are not supported by the file system, or are disabled,
-.I errno
-is set to
-.BR ENOTSUP .
+buffer is too small to hold the result.
 .PP
-The errors documented for the
+In addition, the errors documented in
 .BR stat (2)
-system call are also applicable here.
+can also occur.
 .SH VERSIONS
 These system calls have been available on Linux since kernel 2.4;
 glibc support is provided since version 2.3.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 These system calls are Linux-specific.
 .\" .SH AUTHORS
 .\" Andreas Gruenbacher,
@@ -162,3 +160,12 @@ These system calls are Linux-specific.
 .BR stat (2),
 .BR attr (5),
 .BR symlink (7)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.