[comp.sys.amiga] DOS 1.2 Path Implementation

pete@topaz.berkeley.edu (01/19/87)

At the BADGE meeting last Thursday, Tom Rokicki asked how DOS 1.2 manages
the Path.  I gave a quick answer from memory which turned out to be slightly
off beam, so for anybody who was misled, and for anybody else who burns with
curiosity, here is (I hope) the straight dope.

The path list searched by the CLI is basically a chain of directory locks
hung off CommandDir in the CLIStruct.  The locks are NOT chained through
their NextLock entries, though.  Rather there is a chain of simple nodes
apparently of the following form:

            struct pathdir /* my own name...*/ {
                   BPTR next, /* pointer to next node (or NULL) */
                        lock; /* pointer to the directory lock itself */
            }

Note that they're Bloody BPTRS, so you have to do the usual shifting mess
before you can use them.

Obviously they can't use the link in the lock itself because (the manual
says that) AMIGADos uses it.  I haven't checked to see if they duplicate the
locks as well as the list when you open a New CLI.  I suppose they have to,
or you'd get locks hanging around after you reset the path.


                                               Pete