Programmatically test for a DVD drive

Joe Marcus Clarke marcus at FreeBSD.org
Fri Dec 19 13:11:47 PST 2003


On Fri, 2003-12-19 at 16:07, John-Mark Gurney wrote:
> Joe Marcus Clarke wrote this message on Fri, Dec 19, 2003 at 15:08 -0500:
> > > 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.
> 
> cdrecord on macosx (I don't have a FreeBSD box w/ atapi-cam on it handy),
> has the -prcap in:
> Cdrecord 2.01a14 (powerpc-apple-macosx6.8) Copyright (C) 1995-2003 Jörg Schilling
> 
> and returns this:
> Drive capabilities, per MMC-2 page 2A:
> 
>   Does read CD-R media
>   Does write CD-R media
>   Does read CD-RW media
>   Does write CD-RW media
>   Does read DVD-ROM media
>   Does read DVD-R media
>   Does not write DVD-R media
>   Does not read DVD-RAM media
>   Does not write DVD-RAM media
>   Does support test writing
> 
> which is probably what you're interested in..

Exactly.  I was looking through the code, and it does indeed get all of
the info I need.  Thanks again.

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team	::	marcus at FreeBSD.org
gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20031219/582c1c07/attachment.bin


More information about the freebsd-hackers mailing list