Questions about devices and input.
Intron
mag at intron.ac
Mon Aug 14 06:49:14 UTC 2006
Dag-Erling [iso-8859-1] Smo/rgrav wrote:
> "Sean Bryant" <bryants at gmail.com> writes:
>> I'm writing some cd buring software using burncd as a reference. I was
>> wondering if its possible to detect opening and closing of the doors.
>
> Unfortunately, no. The drive may not even have a door.
>
> DES
> --
> Dag-Erling Smo/rgrav - des at des.no
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
Mr. smo/rgrav loves playing joke very much. But most of CD/DVD drives
have a door, though generally speaking, software cannot detect the
open/close status of a door directly. However, software can command the
drive to open/close its door.
please see the source of cdcontrol(1):
/usr/src/usr.sbin/cdcontrol/cdcontrol.c
In the function "int run (int cmd, char *arg)":
case CMD_CLOSE:
...
case CMD_EJECT:
...
------------------------------------------------------------------------
From Beijing, China
More information about the freebsd-hackers
mailing list