From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 19 12:09:22 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 84EEC16A4CF for ; Fri, 19 Dec 2003 12:09:22 -0800 (PST) Received: from ms-smtp-03-eri0.southeast.rr.com (ms-smtp-03-lbl.southeast.rr.com [24.25.9.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1669243D70 for ; Fri, 19 Dec 2003 12:08:50 -0800 (PST) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (rdu74-159-108.nc.rr.com [24.74.159.108])hBJK8jov027675; Fri, 19 Dec 2003 15:08:45 -0500 (EST) Received: from [10.2.1.4] (vpn-client-4.marcuscom.com [10.2.1.4]) hBJK6Su5034369; Fri, 19 Dec 2003 15:06:28 -0500 (EST) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: John-Mark Gurney In-Reply-To: <20031219200214.GC559@funkthat.com> References: <1071624821.78714.9.camel@shumai.marcuscom.com> <20031219200214.GC559@funkthat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TX8JLsVzzbI8OdH6BOu0" Organization: FreeBSD, Inc. Message-Id: <1071864527.762.17.camel@gyros> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 19 Dec 2003 15:08:47 -0500 X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on creme-brulee.marcuscom.com X-Virus-Scanned: Symantec AntiVirus Scan Engine 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 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:09:22 -0000 --=-TX8JLsVzzbI8OdH6BOu0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-12-19 at 15:02, John-Mark Gurney wrote: > 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 i= f > > 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 fo= r > > doing this, or should I just try to execute a DVD ioctl, and test to se= e > > if it succeeds? Thanks. >=20 > 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. Thanks for the pointer. Using atapi-cam is not a problem since the application I'm porting is basically a front-end to cdrecord which requires atapi-cam. However, I didn't know cdrecord detected the difference on its own, or just did what it was told via command line arguments. Joe >=20 > You could also read the specs for atapi, and implement the ioctl for > the atapi-cd drivers to do the query. --=20 Joe Marcus Clarke FreeBSD GNOME Team :: marcus@FreeBSD.org gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-TX8JLsVzzbI8OdH6BOu0 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/41rPb2iPiv4Uz4cRAiHNAKCRINVzqPYqe5Mo3wuUKdX7B9tnxwCfRtcB UGPQoApviQ6Fx583WRlKQPI= =uOci -----END PGP SIGNATURE----- --=-TX8JLsVzzbI8OdH6BOu0--