~ubuntu-branches/ubuntu/gutsy/dvd+rw-tools/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/02-growisofs-plextor.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant, Ongoing Merge Process
  • Date: 2006-06-29 00:04:05 UTC
  • mfrom: (0.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060629000405-7dmmx8uuucu1brof
Tags: 6.1-2ubuntu1
[ Ongoing Merge Process ]
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh /usr/share/dpatch/dpatch-run
2
 
## 02-growisofs-plextor.dpatch
3
 
##
4
 
## DP: Fixes to fail closing session on some PIONEER DVD-RW drives
5
 
 
6
 
@DPATCH@
7
 
 
8
 
diff -Naur dvd+rw-tools-5.21.4.10.8.orig/growisofs_mmc.cpp dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp
9
 
--- dvd+rw-tools-5.21.4.10.8.orig/growisofs_mmc.cpp     2004-07-16 12:48:57.000000000 +0000
10
 
+++ dvd+rw-tools-5.21.4.10.8/growisofs_mmc.cpp  2005-10-30 14:55:35.319451488 +0000
11
 
@@ -1484,8 +1484,17 @@
12
 
        cmd[1] = 0x01;          // "IMMED"
13
 
        cmd[2] = mode;          // "Close session"
14
 
        cmd[9] = 0;
15
 
-       if ((err=cmd.transport()))
16
 
-           sperror ("CLOSE SESSION",err);
17
 
+       
18
 
+       // it seems, that pioneer is a bit crappy
19
 
+       while (err=cmd.transport()) {
20
 
+           if (SK(err)==0x2 && ASC(err)==0x04 && ASCQ(err)==0x07) {
21
 
+                   sperror ("CLOSE SESSION (but try to continue)",err);
22
 
+                   usleep(10000);
23
 
+           } else {
24
 
+                   sperror ("CLOSE SESSION",err);
25
 
+                   break;
26
 
+           }
27
 
+       }
28
 
 
29
 
        if (wait_for_unit (cmd)) break;
30