Bug 51871

Summary: getxattr() man page wrongly refers to ENOATTR
Product: Documentation Reporter: Andrew Perepechko (andrew_perepechko)
Component: man-pagesAssignee: documentation_man-pages (documentation_man-pages)
Status: RESOLVED CODE_FIX    
Severity: normal CC: mtk.manpages
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Andrew Perepechko 2012-12-20 18:05:19 UTC
man 2 getxattr reads:

"If the named attribute does not exist, or the process has no access to this attribute, errno is set to ENOATTR."

However, the actual error code returned is ENODATA.
Comment 1 Andrew Perepechko 2012-12-20 18:13:53 UTC
Hm, actually ENODATA is an alias of ENOATTR defined in libattr header.
Comment 2 Anonymous Emailer 2012-12-22 08:19:28 UTC
Reply-To: hch@infradead.org

On Thu, Dec 20, 2012 at 06:13:54PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> --- Comment #1 from Andrew Perepechko <andrew_perepechko@xyratex.com> 
> 2012-12-20 18:13:53 ---
> Hm, actually ENODATA is an alias of ENOATTR defined in libattr header.

But that's:

 a) not how normal Posix errno values are supposed to work.  I
 b) limited to using xattr, whichle getxattr is also exposed by glibc
 directly.

This really needs an explanation in the NOTES section, I'll see if I can
come up with someting useful.
Comment 3 Michael Kerrisk 2013-01-18 23:00:47 UTC
Andrew, (and Christoph),

Others have also noted this point. For each of the relevant pages, I've simply added the text: "(ENOATTR is defined to be a synonym for ENODATA in <attr/xattr.h>.)"
Comment 4 Andrew Perepechko 2013-01-18 23:04:33 UTC
Thanks, Michael and Christoph!