--
Copyright (c) 1991, 1992 by Frank J. Edwards, crash%ckctpa@myrddin.sybus.com
See the file COPYRIGHT for details.  If you didn't receive a copy of that
file, contact me and I'll send you one.
--
There is a mount helper backend program which lives in "./ados_fs"
and is called (strangely enough :-) "mount".  Source code is in the same
directory.  (You'll also find "lsfs" there, which just lists out all of
the available filesystems linked into the kernel.  Not much use really,
but this is code that I developed VERY early on and I hate to delete
working code. :-)

When called by the generic mount command via "mount -F ados", or by just
"mount /path/name" if the details are in /etc/vfstab, it expects to
parse options which tell it where the root block is and what kind of
filesystem structure to expect.  These options are "first=" and "length="
(abbreviated "f=" and "l=", respectively).  They are the block number
of the first useable block, and the length of the partition in blocks
(512-byte blocks).

    [1/20/92:  after talking with Jan, it would appear that "length="
    and dos='DOS\0' or dos='DOS\1' would suffice since the number of
    reserved blocks MUST BE 2 for ADOS to access an AmigaDOS partition.
    At least, for compatibility's sake.]

Here's a sample /etc/vfstab entry:

/dev/dsk/c6d0s3 /dev/rdsk/c6d0s3 /Work2 ados 2 no l=68845,ro

The mount program first uses sysfs() to find out what the vfssw index
is for "ados" which is needed for the mount() call.

It then uses "rootblk = (len - 1 + first) / 2" to locate the root block,
and passes this data to the VFS through the 5th and 6th arguments to the
mount(2) system call.  Note that the dos type, ie. DOS0, DOS1, etc, is
not required since the mount command will read the first 4 bytes off of
the partition being mounted and determine that itself.  However, if you
specify a value for the first block, then the partition is _not_ read
and you must set the "flags" parameter appropriately based on whether
the partition is DOS0 or not.  If it is DOS0, use "flags=3", otherwise
use "flags=2".  (The bottom bit controls OFS and non-OFS; bit 1 is
used to indicate that the floppy may support DIR_CACHING.  It is
unclear whether this needs to user-determined, but is provided here to
allow an additional sanity check inside the vfs.)

Note that RDONLY is currently a required flag, but is not provided
automatically by the mount command -- you MUST specify "-o ro" or "-r"
when you issue the mount command or put the same option in /etc/vfstab.
This was done so that the mount helper won't have to change in the
future (at least not too much, I hope :-).

I recommend installing this directory by creating a symbolic link:

    # ln -s `pwd`/ados_fs /usr/lib/fs/ados

--
The files in ./master.d belong in /usr/sys/master.d; be careful 'cuz
filesys.c already exists there...

After moving the above, rebuild the kernel.  I rebuild mine using absolute
binding so that I can leave the debugging information in the boot image
(the boot-time binder doesn't know how to handle some DIE's).  This allows
me to use ADB on the kernel and have the symbol information available.  It
also means that it's easier to check for undefined symbols (booting a
kernel with undefined symbols causes a guru -- I've added an "nm -u"
command to my /usr/sys/Makefile to check for this, but...)

If it doesn't work, I'd certainly like to hear about it, but I can say that
it is undergoing almost changes every day.  Good luck with it!
--
11/13/92

I've created a shell script called "addados" which will execute the
"rdb" command on the given device name(s) and add entries to the
/etc/vfstab file so that they can be mounted automatically.  See the
comments at the beginning of the script for usage and implementation
details.
--
11/16/92

A change to the mount command.  Always set the DIR_CACHING bit.
Ask Randall for details on the DOS3 and DOS5 filesystem types.  (Should
I actually go to DevCon this year?  God, I'd hate to give C= the impression
that I'll continue to support them even if when back out on Unix!)
--
11/19/92

This is the first "released" code.  All files will be marked as "Rel"
and all source re-compiled.  Hopefully I've gotten everything, but I'm
sure that the intensity of my devoted beta testers will find any
stragglers; right guys?!  ;-)
