Package: dvd+rw-tools
Version: 6.1-2

When trying to read or set the booktype for the unit on a Lite-On dvd drive, the dvd+rw-booktype will always fail when the drive is empty.

>dvd+rw-booktype -inq -unit+r /dev/hdc
:-( BTC_FAh: no media mounted

It always fails with a BTC error - even though my drive is not a BTC, it is a Lite-On. After debugging, it appears the the error code returned by the empty Lite-On drive is the same as what is expected in the code from an empty BTC drive. The source should not assume that this is a BTC drive when this error code is read. After applying the patch, I am able to set and read the booktype on my Lite-On drive without having to load any media.

>dvd+rw-booktype -inq -unit+r /dev/hdc
Unit will brand DVD+plus media as DVD-ROM

I'm using kernel 2.6.15.8 testing GNU/Linux with libc6 2.3.6-3

Thanks,
Ronan


diff -Naur dvd+rw-tools-6.1.orig/dvd+rw-booktype.cpp 
dvd+rw-tools-6.1.good/dvd+rw-booktype.cpp
--- dvd+rw-tools-6.1.orig/dvd+rw-booktype.cpp   2004-11-06 12:44:47.000000000 
-0500
+++ dvd+rw-tools-6.1.good/dvd+rw-booktype.cpp   2006-03-20 21:29:34.000000000 
-0500
@@ -796,8 +796,11 @@
        cmd[11]=0xFF;
        if (!(err=cmd.transport()) || ASC(err)==0x24)
            return btc (cmd,action,book);
-       else if (ASC(err)==0x3A)
-           return fprintf (stderr,":-( BTC_FAh: no media mounted\n"),1;
+       //An empty LITEON will return "ASC(err)==0x3A", even though it
+       //is not a BTC - so don't assume this is an empty BTC drive
+       //Next 2 lines commented out
+       //else if (ASC(err)==0x3A)
+       //    return fprintf (stderr,":-( BTC_FAh: no media mounted\n"),1;
 
        // See if it's LITE-ON design...
        unsigned char buf[0x80];

Reply via email to