[comp.bugs.sys5] Bug in DIRENT

guy@gorodish.UUCP (02/17/87)

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.