Am I using patch right ?

Dave S ubuntu at pusspaws.net
Mon Apr 17 08:55:08 UTC 2006


Hi all,

I have a PIONEER DVD-RW DVR-110D which has a problem writting DVDs of >1GB, 
its a firmware glitch in the drive. A patch is available for dvd+rw-tools 
which sorts the problem.

http://groups.google.de/group/mailing.comp.cdwrite/browse_thread/thread/d3cd5578d58caa72/4879ae92da2f5f7f?q=CLOSE+SESSION+failed+with+SK%3D2h%2FASC%3D04h%2FACQ%3D07h&rnum=1&hl=de#4879ae92da2f5f7f

The patch being ...

diff -ur dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp 
dvd+rw-tools-5.21.4.10.8.fixed/growisofs_mmc.cpp 
 --- dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp  2004-07-16 14:48:57.000000000 
+0200 
 +++ dvd+rw-tools-5.21.4.10.8.fixed/growisofs_mmc.cpp    2005-04-09 
18:16:09.000000000 +0200 
 @@ -1484,8 +1484,17 @@ 
         cmd[1] = 0x01;          // "IMMED" 
         cmd[2] = mode;          // "Close session" 
         cmd[9] = 0; 
 -       if ((err=cmd.transport())) 
 -           sperror ("CLOSE SESSION",err); 
 +       
 +       // it seems, that pioneer is a bit crappy 
 +       while (err=cmd.transport()) { 
 +           if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) { 
 +                   sperror ("CLOSE SESSION (but try to continue)",err); 
 +                   usleep(10000); 
 +           } else { 
 +                   sperror ("CLOSE SESSION",err); 
 +                   break; 
 +           } 
 +       } 
 
        if (wait_for_unit (cmd)) break; 
 
-=- 

I downloaded  dvd+rw-tools from sourceforge, unzipped it etc ... and cd'd to 
it.I made a file called patch_fix which consists of the above.


dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$ 
cat patch_fix
diff -ur dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp 
dvd+rw-tools-5.21.4.10.8.fixed/growisofs_mmc.cpp
--- dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp  2004-07-16 14:48:57.000000000 
+0200
+++ dvd+rw-tools-5.21.4.10.8.fixed/growisofs_mmc.cpp    2005-04-09 
18:16:09.000000000 +0200
@@ -1484,8 +1484,17 @@
        cmd[1] = 0x01;          // "IMMED"
        cmd[2] = mode;          // "Close session"
        cmd[9] = 0;
-       if ((err=cmd.transport()))
-           sperror ("CLOSE SESSION",err);
+
+       // it seems, that pioneer is a bit crappy
+       while (err=cmd.transport()) {
+           if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) {
+                   sperror ("CLOSE SESSION (but try to continue)",err);
+                   usleep(10000);
+           } else {
+                   sperror ("CLOSE SESSION",err);
+                   break;
+           }
+       }

       if (wait_for_unit (cmd)) break;

-=-
dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$

dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$
patch -p1 < patch_fix
patching file growisofs_mmc.cpp
Hunk #1 FAILED at 1484.
1 out of 1 hunk FAILED -- saving rejects to file growisofs_mmc.cpp.rej
dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$

dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$ 
cat growisofs_mmc.cpp.rej
***************
*** 1484,1491 ****
         cmd[1] = 0x01;          // "IMMED"
         cmd[2] = mode;          // "Close session"
         cmd[9] = 0;
-        if ((err=cmd.transport()))
-            sperror ("CLOSE SESSION",err);

        if (wait_for_unit (cmd)) break;

--- 1484,1500 ----
         cmd[1] = 0x01;          // "IMMED"
         cmd[2] = mode;          // "Close session"
         cmd[9] = 0;
+
+        // it seems, that pioneer is a bit crappy
+        while (err=cmd.transport()) {
+            if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) {
+                    sperror ("CLOSE SESSION (but try to continue)",err);
+                    usleep(10000);
+            } else {
+                    sperror ("CLOSE SESSION",err);
+                    break;
+            }
+        }

        if (wait_for_unit (cmd)) break;

dave at dave-comp:~/Desktop/dvd+rw-tools-5.21.4.10.8/dvd+rw-tools-5.21.4.10.8$

Now I am pretty green with patches, the version number of the package and diff 
number are the same, any idea what i have done wrong ?

Cheers :)

Dave







More information about the ubuntu-users mailing list