Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 14:49:10 +0800
From:      "Intron" <mag@intron.ac>
To:        des@des.no
Cc:        freebsd-hackers@freebsd.org, Sean Bryant <bryants@gmail.com>
Subject:   Re: Questions about devices and input.
Message-ID:  <courier.44E01CE6.0000088A@intron.ac>
In-Reply-To: <86bqqnyhlm.fsf@xps.des.no>
References:  <f6791cc60608131508x6e6c77d3i65e4b503be9eeee4@mail.gmail.com> <86bqqnyhlm.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling  [iso-8859-1] Smo/rgrav wrote:

> "Sean Bryant" <bryants@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@des.no
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?courier.44E01CE6.0000088A>