On 10/6/2020 7:46 AM, Noel Chiappa wrote:
I'm not a SIMH user, though (I'm an
Ersatz-11 person); is there
anyone who is, who'd like to play with MiniUnix
with me?
I've been meaning to jump into this, since I own both an 11/05 and an
11/03, which I'd very much like to run Unix on. I've also used simh for
various things (including bringing up 2.9BSD on my 11/23), but I can
hardly call myself an expert.
Are there any notes you can share on how to get to the point you're at?
for(cp = &u.u_dbuf[0]; cp <
&u.u_dbuf[DIRSIZ]; cp++)
if(*cp != cp[u.u_dent.u_name - u.u_dbuf])
Found this in the v6 sources
(
http://www.retro11.de/ouxr/u6ed/usr/sys/ken/nami.c.html) The code is
doing a string comparison between the name in the current directory
entry (u_dent) and the current pathname component (in u_dbuf). The
expression in brackets is the relative distance between the two name
fields within the u struct. If the if expression evaluates to true,
then the names do *not* match, and the code loops back to eloop to check
the next entry.
Since namei() searches for a particular named entry in a directory, its
reasonable to assume that this particular comparison would fail a number
of times before finding the correct entry.
It seems to check most of the (wrong) directory
entries OK, but then
inexplicably (to me) fails.
In what way does it fail? Is it simply that namei() doesn't find the
file its looking for?
--Jay