Subject: Re: ZIP drives
To: None <current-users@NetBSD.ORG>
From: Phil Knaack <flipk@ncremp.ag.iastate.edu>
List: current-users
Date: 09/05/1995 14:06:13
>Of course, there's a window between inserting the disc and mounting
>it, and again between unmounting and ejecting it, where someone else
>could modify the disc.  I'm open to suggestions on how to close
>this...

	How about this idea (requires some hand-waving, and probably isn't 
quite practical to implement, but perhaps it will spawn other ideas):

	The user who wants to insert a {ZIP, floppy} disk executes the mount
command with a special option that says "wait for media insertion." It then
locks the device in anticipation of insertion. If someone else attempts this,
it will return with "device in use" or "device locked" or something along
those lines.
	Then once the user inserts the disk it performs the mount.

	This way you know not to insert your disk if you get "device locked",
because you know someone else is attempting to access it, and if you don't
get this message (and perhaps get another message), you know its safe to 
proceed because you're assured the device is in fact locked for you.

	Problems: how do you detect insertion of the device? Many floppies
(i understand) have a door switch; perhaps this could be monitored? I suspect
this would require a kernel modification. And as for ZIP drives, does it
create any particular messages upon device insertion? This sounds like it
would require a kernel modification as well to detect.

	Comments?

PS: as for the ZIP / EZ debate, that lack of configurable scsi ID thing
    is more of a pain than i thought. i wanted to see if i could create
    a ZIP disk for each operating system I use and just boot to that disk,
    but that doesn't work, not being able to set it to scsi ID 0. :) booting
    to a ZIP disk would be a WONDERFUL way to install netbsd on a 
    new machine..

--
Phil Knaack
Tech Junkie / Junk Techie / Administrator of crude and amazing machines