diff --git a/src/dvdisaster.c b/src/dvdisaster.c index 50d89e2..77cafb0 100644 --- a/src/dvdisaster.c +++ b/src/dvdisaster.c @@ -92,6 +92,7 @@ typedef enum MODIFIER_NO_BDR_DEFECT_MANAGEMENT, MODIFIER_NO_PROGRESS, MODIFIER_OLD_DS_MARKER, + MODIFIER_PERMISSIVE_MEDIUM_TYPE, MODIFIER_PREFETCH_SECTORS, MODIFIER_RANDOM_SEED, MODIFIER_RAW_MODE, @@ -249,6 +250,7 @@ int main(int argc, char *argv[]) {"no-bdr-defect-management", 0, 0, MODIFIER_NO_BDR_DEFECT_MANAGEMENT }, {"no-progress", 0, 0, MODIFIER_NO_PROGRESS }, {"old-ds-marker", 0, 0, MODIFIER_OLD_DS_MARKER }, + {"permissive-medium-type", 0, 0, MODIFIER_PERMISSIVE_MEDIUM_TYPE }, {"prefetch-sectors", 1, 0, MODIFIER_PREFETCH_SECTORS }, {"prefix", 1, 0, 'p'}, {"random-errors", 1, 0, MODE_RANDOM_ERR }, @@ -524,6 +526,10 @@ int main(int argc, char *argv[]) case MODIFIER_OLD_DS_MARKER: Closure->dsmVersion = 0; break; + case MODIFIER_PERMISSIVE_MEDIUM_TYPE: + Closure->permissiveMediumType = TRUE; + debug_mode_required = TRUE; + break; case MODIFIER_PREFETCH_SECTORS: Closure->prefetchSectors = atoi(optarg); if( Closure->prefetchSectors < 32 @@ -982,6 +988,7 @@ int main(int argc, char *argv[]) { PrintCLI("\n"); PrintCLI(_("Debugging options (purposefully undocumented and possibly harmful)\n")); PrintCLI(_(" --debug - enables the following options\n")); + PrintCLI(_(" --permissive-medium-type - allow more media types, even theoretically unsupported ones\n")); PrintCLI(_(" --byteset s,i,b - set byte i in sector s to b\n")); PrintCLI(_(" --cdump - creates C #include file dumps instead of hexdumps\n")); PrintCLI(_(" --compare-images a,b - compare sectors in images a and b\n")); diff --git a/src/dvdisaster.h b/src/dvdisaster.h index 4d61208..142c1d5 100644 --- a/src/dvdisaster.h +++ b/src/dvdisaster.h @@ -265,6 +265,7 @@ typedef struct _GlobalClosure int fixedSpeedValues;/* output fixed speed reading to make comparing debugging output easier */ int noBdrDefectManagement;/* if true, enable use of the BD*_NODM sizes, default: false */ int ignoreRS03header; /* if true, ignore the RS03 header when repairing, forcing a full search (debug only) */ + int permissiveMediumType; /* if true, don't bail out on some UNSUPPORTED medium types (debug only) */ char *homeDir; /* path to users home dir */ char *dotFile; /* path to .dvdisaster file */ char *logFile; /* path to logfile */ diff --git a/src/scsi-layer.c b/src/scsi-layer.c index 539f7d0..01fcec3 100644 --- a/src/scsi-layer.c +++ b/src/scsi-layer.c @@ -922,13 +922,17 @@ static int query_dvd(DeviceHandle *dh, int probe_only) } dh->typeDescr = g_strdup("DVD-ROM"); - dh->subType = UNSUPPORTED; + /* this also happens to be the detected medium type for the Windows 10 iso mounter, + if you want to use it to test dvdisaster, use --permissive-medium-type */ + if (!Closure->permissiveMediumType) + dh->subType = UNSUPPORTED; break; } default: dh->typeDescr = g_strdup_printf("DVD book type 0x%02x",(phy_info4>>4) & 0x0f); - dh->subType = UNSUPPORTED; + if (!Closure->permissiveMediumType) + dh->subType = UNSUPPORTED; break; }