
MacEFS -- An External File System for the Macintosh
		Copyright (C) 1984 by John Seamons, Lucasfilm Ltd.

Abstract:
--------
MacEFS allows a remote Unix machine to act as file server for the Mac via
the modem serial port.  The program on the Mac is called simply "efs".
On the server side the "efsd" program is installed and monitors the serial
line interpreting requests from the efs program on the Mac.  Efs allows the
Mac Finder to store and retrieve files by the same file/folder/desktop
metaphor it uses on local disk files.  This version does not support mapping
of the Unix directory structure into folders -- all Mac files are stored in
the current Unix directory the efsd server happens to be running in [as soon
as I decipher the structure of the Finder's "DeskTop" file this will change].

How to use it:
-------------
In the Makefile, defining the DEBUG variable will 
enable debugging messages on the printer port of
the Mac at 9600 baud (attach a terminal).  It will also use up lots of memory.
Start the efsd server.

Now you can run the efs program.  After it exits, and the Finder starts
up again, a new disk icon will appear on the screen.  The name of the disk
will be the Unix directory name that the efsd program is running in.
You can now open the remote disk and copy files to it.  Once the files are
there you can duplicate them, or copy them back to the local disk.
You can also create folders and put files into them as usual (remember that
putting a file in a folder still stores it in the current Unix directory).
It's also possible to run a program directly from the remote disk.

You can now download programs by simply copying the .rsrc file on
Unix to a file ending in .RF (resource fork) in the current directory where
efsd is running and then, on the Mac, copying the corresponding file to
the local disk.  For example, if you've copied a filed called "foo" from the
local disk to the remote disk three files will be created on the Unix end:
foo.DF, foo.RF and foo.IF.  The data and resource forks of the Mac file
are stored in the .DF and .RF Unix files respectively.  The .IF file contains
16 bytes of Finder information.  If you overwrite foo.RF with the new .rsrc
file then the next time foo is copied back to the local disk the .rsrc
information will be transmitted to the Mac.  You could also just run the
program directly without copying to the local disk.  An icon is displayed
in the upper right corner of the screen whenever a serial transfer is
taking place so you'll know things are really happening.

How it works:
------------
If there isn't already an external file system defined
(via the toExtFS system global) efs loads the driver portion (second CODE
resource) into the system heap and detaches it so it won't be deallocated
when efs exits.  It then sets a 15 second timer via the vertical retrace
manager to call the efs driver and produce a "disk inserted" event.
This is necessary because the Finder clears the event queue when it
starts up and wouldn't notice the disk inserted event.  Once it has been
notified of the new drive the Finder attempts to mount the volume and the
efs driver grabs all subsequent requests to the drive.  The Finder will
display the remote disk each time it is restarted.

Files descriptions:
-----------------
	efsd.c		server program to run on the Unix host
	efsinit.c	installs the efs driver in the system zone.
	efs.c		the efs driver
	net.c		implements the serial line packet protocol
	com.c		common routines including a scaled-down printf
	misc.s		condensed library routines to minimize text space
	fs.h		Mac file system definitions
	efs.h		packet protocol definitions

TODO:
----
	- Figure out how to map Unix directory structure into folders.
	- Should support multiple connections.
	- Efsinit should query for host name, directory name,
	  baud rate, etc.
	- Set proper modified/created times (how many seconds between
	  1/1/04 and 1/1/70?).
	- Retry mechanism for efsd.
	- Implement packet checksums.
	- Consensus enforcement (line break?).
	- Allow BSIZE > 255.
	- Show correct number of bytes used on disk.
	- Make it work at 56Kb, somehow.
	- Limit volume names to 27 characters.
	- Finds out why BFS doesn't recognize remote disk files.
	- Check for input overrun.
