Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 2003 12:02:14 -0800
From:      John-Mark Gurney <gurney_j@efn.org>
To:        Joe Marcus Clarke <marcus@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: Programmatically test for a DVD drive
Message-ID:  <20031219200214.GC559@funkthat.com>
In-Reply-To: <1071624821.78714.9.camel@shumai.marcuscom.com>
References:  <1071624821.78714.9.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031219200214.GC559>