Bug in DIRENT(4) manual page

guy at gorodish.UUCP guy at gorodish.UUCP
Tue Feb 17 07:15:35 AEST 1987


The DIRENT(4) manual page claims that the "d_off" field of a file
system-independent directory entry contains the offset of that entry.
This conflicted with the directory library code, which returns the
"d_off" field for the entry just read if you do a "telldir", with the
"getdents" code, and with our experience in doing that sort of thing;
the NFS "readdir" operation returns the offset of the *next* entry
with each entry, because that's what you're usually interested in
after reading an entry.

Well, I tried it on a 3B2 here, and by golly, the first directory
entry in "/" gets a "d_off" of 16, not 0.

The documentation is in error, it seems.



More information about the Comp.bugs.sys5 mailing list