[Debburn-changes] r678 - cdrkit/trunk/wodim
Eduard Bloch
blade at alioth.debian.org
Sat Jan 6 11:21:03 CET 2007
Author: blade
Date: 2007-01-06 11:21:03 +0100 (Sat, 06 Jan 2007)
New Revision: 678
Modified:
cdrkit/trunk/wodim/drv_mmc.c
Log:
Disable dummy mode for some media types
Modified: cdrkit/trunk/wodim/drv_mmc.c
===================================================================
--- cdrkit/trunk/wodim/drv_mmc.c 2007-01-06 03:19:50 UTC (rev 677)
+++ cdrkit/trunk/wodim/drv_mmc.c 2007-01-06 10:21:03 UTC (rev 678)
@@ -1280,12 +1280,11 @@
mp->test_write = 0;
/*
- * This is the only place where we reset mp->test_write (-dummy)
+ * This is the only place where we reset mp->test_write (-dummy) for DVD
*/
if (reset_dummy)
mp->test_write = 0;
-
/*
* Set default values:
* Write type = 02 (session at once)
@@ -1865,9 +1864,28 @@
usal_prbytes("CD write parameter:", (Uchar *)mode, len);
#endif
+ if(dummy) {
+ mp->test_write = 1;
+ /* but it does not work on DVD+RW and -RAM, also bail out on other
+ * types that have not been tested yet */
+ int profile=get_curprofile(usalp);
+ switch(profile) {
+ case(0x12):
+ case(0x1a):
+ case(0x2a):
+ case(0x43):
+ case(0x52):
+ {
+ fprintf(stderr,
+ "Dummy mode not possible with %s.\n",
+ mmc_obtain_profile_name(profile) );
+ exit(EXIT_FAILURE);
+ }
+ }
+ }
+ else
+ mp->test_write = 0;
- mp->test_write = dummy != 0;
-
#ifdef DEBUG
usal_prbytes("CD write parameter:", (Uchar *)mode, len);
#endif
More information about the Debburn-changes
mailing list