4.3 Tahoe rrestore bug
Guy Harris
guy at auspex.UUCP
Wed Nov 23 03:20:58 AEST 1988
># 1) dirfile is NOT a directory but a file (created by rrestore)
>
>I don't know about the rest of your article, but this I can answer: it knows
>it's trying to open a dirfile, it just copied it in from the tape. The ndir(3)
>routines don't care if it's really a directory, just as long as the format is
>compatible. The routines are read-only since they run in user-mode; if you
>point 'em at a file that happens to look like a directory, they work fine.
Note that under SunOS:
1) The directory library routines use "getdirentries()" in 2.x
and 3.x releases, and "getdents()" in 4.0.
2) Those routines transform the contents of the file; they are
not equivalent to "read()" on a directory file.
3) I don't know whether those routines work on non-directory
files.
4) In any case, "opendir()" returns an error when you try to
open a file that isn't a directory.
The bottom line is that the format isn't compatible, so you can't point
the directory library routines at a non-directory, even if it happens to
look like one.
The SunOS version of "restore" contains what amounts to a copy of the
"old" directory library (the one that directly reads the directory file).
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list