From 2965fbf16539f9442c8a85dc356a50f41bb443dc Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 18 Jan 2013 23:29:28 +0100 Subject: [PATCH] getxattr.2, removexattr.2, setxattr.2: Note that ENOATTR is a synonym for ENODATA Various people have pointed out that strace(1) shows ENODATA for the case where the named attribute does not exist, or the process has no access to this attribute. ENODATA and ENOATTR are in fact defined as synonyms. Point this out in the man page, so that people understand the strace(1) info. See https://bugzilla.kernel.org/show_bug.cgi?id=51871 Reported-by: Andrew Perepechko Reported-by: Signed-off-by: Michael Kerrisk --- man2/getxattr.2 | 7 ++++++- man2/removexattr.2 | 7 ++++++- man2/setxattr.2 | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/man2/getxattr.2 b/man2/getxattr.2 index 86dfc8919..5638080a0 100644 --- a/man2/getxattr.2 +++ b/man2/getxattr.2 @@ -24,7 +24,7 @@ .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" -.TH GETXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual" +.TH GETXATTR 2 2013-01-19 "Linux" "Linux Programmer's Manual" .SH NAME getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value .SH SYNOPSIS @@ -111,6 +111,11 @@ this attribute, .I errno is set to .BR ENOATTR . +.RB ( ENOATTR +is defined to be a synonym for +.BR ENODATA +in +.IR .) .PP If the .I size diff --git a/man2/removexattr.2 b/man2/removexattr.2 index aae3e66b1..c920a7362 100644 --- a/man2/removexattr.2 +++ b/man2/removexattr.2 @@ -24,7 +24,7 @@ .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" -.TH REMOVEXATTR 2 2001-12-01 "Linux" "Linux Programmer's Manual" +.TH REMOVEXATTR 2 2013-01-19 "Linux" "Linux Programmer's Manual" .SH NAME removexattr, lremovexattr, fremovexattr \- remove an extended attribute .SH SYNOPSIS @@ -87,6 +87,11 @@ If the named attribute does not exist, .I errno is set to .BR ENOATTR . +.RB ( ENOATTR +is defined to be a synonym for +.BR ENODATA +in +.IR .) .PP If extended attributes are not supported by the file system, or are disabled, .I errno diff --git a/man2/setxattr.2 b/man2/setxattr.2 index 3c034183f..3ba886fdd 100644 --- a/man2/setxattr.2 +++ b/man2/setxattr.2 @@ -24,7 +24,7 @@ .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" -.TH SETXATTR 2 2001-12-31 "Linux" "Linux Programmer's Manual" +.TH SETXATTR 2 2013-01-19 "Linux" "Linux Programmer's Manual" .SH NAME setxattr, lsetxattr, fsetxattr \- set an extended attribute value .SH SYNOPSIS @@ -122,6 +122,11 @@ is specified, and the attribute does not exist, .I errno is set to .BR ENOATTR . +.RB ( ENOATTR +is defined to be a synonym for +.BR ENODATA +in +.IR .) .PP If there is insufficient space remaining to store the extended attribute, .I errno