getdents.2: Before kernel < 2.6.4, 'd_type' was effectively always DT_UNKNOWN

Reported-by: Bastien ROUCARIES <roucaries.bastien@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-01-13 17:46:17 +13:00
parent ade8a1f9f6
commit 8f998fb470
1 changed files with 10 additions and 0 deletions

View File

@ -115,6 +115,16 @@ This is a Unix domain socket.
.B DT_UNKNOWN
The file type is unknown.
.PP
The
.I d_type
field is implemented since Linux 2.6.4.
It occupies a space that was previously a zero-filled padding byte in the
.IR linux_dirent
structure.
Thus, on kernels before 2.6.3,
attempting to access this field always provides the value 0
.RB ( DT_UNKNOWN ).
.PP
Currently,
.\" kernel 2.6.27
.\" The same sentence is in readdir.2