Subject: Re: CD control commands
To: Peter Fairbrother <>
From: Manuel Bouyer <>
List: tech-kern
Date: 10/07/2001 12:22:09
On Sun, Oct 07, 2001 at 07:13:52AM +0100, Peter Fairbrother wrote:
> Hi, I hope this is not too OT, perhaps someone here can help:
> Does anyone know where the controls for a CD player are in source, or how
> they work? I want to arrange things so that if the eject button on the CD

The driver is in sys/dev/scsipi/cd.c

> player is pressed the box will power down immediately, whether or nor the CD
> is mounted. 

I don't think this is possible. I'm not sure at all the CD has a way to
report whenever the eject button has been pressed or not.
There is a command which prevents ejecting the CD (the LOCK command);
the cd driver uses it.

You may be able to do what you want in hardware though; if you can disconnect
the eject switch from the CD circuitery and connect it in place of the ATX
power switch.
Or maybe just remove the eject button ?

Manuel Bouyer <>