Unmounting and 'eject' press

David Zeuthen david at fubar.dk
Tue Jun 1 13:14:39 PDT 2004


On Tue, 2004-06-01 at 16:55, Robert Love wrote:
> On Sun, 2004-05-30 at 22:51 +0200, David Zeuthen wrote:
> 
> > But I haven't found a way to get HAL to detect that the eject button is
> > pressed. I'm not sure it's even possible to poll for this. Of course the
> > right thing would be to have the kernel events layer Robert have been
> > talking about to broadcast this on the system message bus. Does anyone
> > know if it's possible today? Kernel people?
> 
> The kernel events layer is ready to roll, soon as it has a pressing
> need ;-)
> 
> In this case, unfortunately, I am not sure that the hardware generates
> an event when the eject button is pressed.  I believe the kernel issues
> a lock-tray command, which simply renders the eject button useless.
> When the disc is unmounted, the kernel unlocks the tray.  No event is
> ever generated.
> 
> If I am wrong, please let me know - I'll implement the event asap.
> 

Njah, you're right. The device may support this (see my other mail), but
it has to be polled, that's what the MMC-2 and Media Change Status
Notification specs says anyway. And I guess polling is a no go in the
kernel as it reflects policy, right? Either way, I've put this in HAL
(works on my Liteon device) but it can be disabled on a per-device basis
using .fdi files and the property storage.cdrom.eject_check_enabled.
More on that in a little while..

Cheers,
David


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list