Locking or not locking (CD drives)?
Artem Kachitchkine
Artem.Kachitchkin at Sun.COM
Wed May 31 12:19:27 PDT 2006
> I don't think we can rely on it at all; for example Apple laptops don't
> have an eject key at all. What they do have is a special key on the
> keyboard with an eject symbol and everything is thus handled in software
> just as if the EjectPressed signal was emitted.
HAL could emit EjectPressed when the keyboard eject is pressed.
> In the Totem example, Totem would unlock the door as soon as you pause
> or stop playback of e.g. an Audio CD. Also, Eject() on HAL specifically
> and eject(1) in general would blatantly ignore if the door is locked or
> not so you'd always be in a position to eject the disc from your file
> manager.
Eject()/eject(1) behave correctly, because they know how to cleanup
before ejecting the media. Door lock is not there to protect humans from
themselves, or to protect software from software. It's there to protect
software from humans, to provide clean media removal (as opposed to
"picking up the pieces" via 'mount -f' or such).
In an ideal world, pressing Eject on the screen would have the same
effect as pressing Eject on the drive (or keyboard). I would even go so
far as to say that if all eject buttons (software and hardware) on the
system would emit EjectPressed, the overall user experience would be
more consistent.
-Artem.
More information about the hal
mailing list