Bug 51871 - getxattr() man page wrongly refers to ENOATTR
Summary: getxattr() man page wrongly refers to ENOATTR
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-20 18:05 UTC by Andrew Perepechko
Modified: 2013-01-18 23:04 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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!

Note You need to log in before you can comment on or make changes to this bug.