From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 14 06:49:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B35616A4DE for ; Mon, 14 Aug 2006 06:49:14 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CE8143D45 for ; Mon, 14 Aug 2006 06:49:12 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Mon, 14 Aug 2006 14:49:10 +0800 id 00102C04.44E01CE6.0000088A References: <86bqqnyhlm.fsf@xps.des.no> In-Reply-To: <86bqqnyhlm.fsf@xps.des.no> From: "Intron" To: des@des.no Date: Mon, 14 Aug 2006 14:49:10 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: freebsd-hackers@freebsd.org, Sean Bryant Subject: Re: Questions about devices and input. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 06:49:14 -0000 Dag-Erling [iso-8859-1] Smo/rgrav wrote: > "Sean Bryant" 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