Re: Floppy handling

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Mon Jun 19 2000 - 16:37:01 EST


Chris Swiedler wrote:
> In discussing this problem, several people had possible solutions which were
> all shot down with a similar counterargument: the kernel can't assume that
> the user who is using the floppy drive is at the console. Apparently,
> Windows can automount floppies in part because it makes the assumption that
> there is only one user on the machine--an assumption which Unices by design
> can't make.

That's easy. Simply redefine "mount" for floppies.

Like this: User logs in and calls mount(8) with -o removable.

-o removable means "this is a removable medium, the underlying fs is
activated on demand and the user is permitted to change the disk
whenever the light is off".

Note that /dev/fd0 remains mounted (with -o removable) over successive
disk changes, until the user logs out. This is how the association
between the user at the console and the *drive* is made known to the
kernel.

You don't sacrifice any multiuser features for this. It's exactly the
same as deciding who is using the mouse and/or keyboard. Policy remains
in userspace where it belongs.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:18 EST