[PATCH] eject -T support

Rob Landley rob at landley.net
Sat Oct 7 22:01:23 UTC 2006


On Saturday 07 October 2006 5:14 pm, Denis Vlasenko wrote:
> > > 2)  cdrom is mounted many times:
> > > 
> > > /dev/hdd on /media/cdrom1 type iso9660 (ro)
> > > /dev/hdd on /media/cdrom0 type iso9660 (ro)
> > 
> > Pilot error.
> 
> Yes, but we'd better fail instead of unmounting _something else_!
> That's my proposal: just (try to) eject the thing, don't
> try to do umount job.

You're the one making the decisions now, but if you stack mounts and one of 
the underlying mounts goes away, bad things happen anyway.  (This doesn't 
have to be "eject", this can be physically yanking a usb key.  Overmounting 
removable media is a darn stupid thing to do, and people who do it deserve 
what happens to them.)  And if eject doesn't do an umount then it doesn't 
work in the general case.

What does the non-busybox eject do in all these cases?  (Quite possibly 
ignores them.)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list