feat: add --permissive-medium-type option

This option can be useful to try to work with normally unsupported media types.
Namely the Windows 10 default iso mounter (and virtual drive) is tagged DVD-DROM,
even if it mounts bare iso images. Useful for debugging (requires --debug).
This commit is contained in:
Stéphane Lesimple
2020-09-04 23:37:59 +02:00
parent be2f7b67b9
commit 1a9416f7b2
3 changed files with 14 additions and 2 deletions

View File

@@ -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;
}