From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 19 12:03:04 2003 Return-Path: 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 9347A16A4CE for ; Fri, 19 Dec 2003 12:03:04 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id D568443D88 for ; Fri, 19 Dec 2003 12:02:15 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 4733 invoked from network); 19 Dec 2003 20:02:15 -0000 Received: from dsl017-045-168.spk4.dsl.speakeasy.net (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 19 Dec 2003 20:02:15 -0000 Received: from hydrogen.funkthat.com (ohwnsp@localhost.funkthat.com [127.0.0.1])hBJK2Ej2078955; Fri, 19 Dec 2003 12:02:14 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id hBJK2ExN078954; Fri, 19 Dec 2003 12:02:14 -0800 (PST) Date: Fri, 19 Dec 2003 12:02:14 -0800 From: John-Mark Gurney To: Joe Marcus Clarke Message-ID: <20031219200214.GC559@funkthat.com> Mail-Followup-To: Joe Marcus Clarke , hackers@freebsd.org References: <1071624821.78714.9.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1071624821.78714.9.camel@shumai.marcuscom.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: hackers@freebsd.org Subject: Re: Programmatically test for a DVD drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 20:03:04 -0000 Joe Marcus Clarke wrote this message on Tue, Dec 16, 2003 at 20:33 -0500: > I'm trying to figure out the best way to programmatically test to see if > a disc device is a DVD device. That is, how can I tell the difference > between a CD-[ROM|R|RW] and a DVD-[ROM|R|RW]? Is there a set method for > doing this, or should I just try to execute a DVD ioctl, and test to see > if it succeeds? Thanks. Take a look at cdrecord and see what that does... But that might require you to use atapi-cam instead of the "normal" atapi-cd device. You could also read the specs for atapi, and implement the ioctl for the atapi-cd drivers to do the query. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."