🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by guy Mon, 16 Feb 1987 21:15
Bug in DIRENT(4) manual page
#504
Author: guy
Date: Mon, 16 Feb 1987 21:15
13 lines
1117 bytes
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads