Subject: Re: cd-rom media-change events
To: David Young <dyoung@pobox.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/22/2003 20:51:06
On Sat, 22 Mar 2003, David Young wrote:

> I would like to start a timer when the user presses the CD-ROM eject
> button, and then reboot the system when the timer expires or the CD-ROM
> tray is replaced, whichever is sooner. Can I use poll/select/kqueue to
> listen for these media-change events? A quick scan of the SCSI/ATAPI
> code tells me "no," but I am still hopeful.

I haven't looked at the code, but for the SCSI side of things, you'd want
something that would let you open the device and listen for unit attention
messages. I doubt we have it, but it'd be good to have. ;-)

Take care,

Bill