Bug 14795 (getdents-manpage) - getdents manpage wrong
Summary: getdents manpage wrong
Status: RESOLVED CODE_FIX
Alias: getdents-manpage
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 low
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL: n/a
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-13 09:17 UTC by blah
Modified: 2015-04-12 05:42 UTC (History)
2 users (show)

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


Attachments

Description blah 2009-12-13 09:17:23 UTC
It shows source creating a struct instead of including, which doesn't work when the dents can be 64 or 32 bit, it also shows the d_type byte being after the offset, but it is before it in bits/dirent.h
Comment 1 blah 2009-12-13 09:19:21 UTC
the d_type byte moving possibly means the length calculation for d_name in there is wrong too.
Comment 2 xerofoify 2014-06-25 15:37:25 UTC
This bug is obsolete. Please test against a newer kernel to
see if it still is valid.
Cheers Nick
Comment 3 Michael Kerrisk 2015-04-12 05:42:17 UTC
(In reply to blah from comment #0)
> It shows source creating a struct instead of including, which doesn't work
> when the dents can be 64 or 32 bit,

The problem here is that there is no libc support, so, nothing to incude.

> it also shows the d_type byte being
> after the offset, but it is before it in bits/dirent.h

This is only true for the 64-bit structure/getdents64(). For getdents(), the description is accurate, ad the example code demonstartes.

The real problem is that the page does not document getdents64() and the structure that it uses. I've now added a description to the page, which will go out with the next release.

Cheers,

Michael

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