Detect disc type when dumping non-CD MMC devices. Fixes #333

This commit is contained in:
2020-04-18 18:20:43 +01:00
parent 6daf63b057
commit c1f7719765

View File

@@ -44,6 +44,7 @@ using Aaru.CommonTypes.Structs;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.Console;
using Aaru.Core.Logging;
using Aaru.Core.Media.Detection;
using Aaru.Decoders.SCSI;
using Aaru.Devices;
using Schemas;
@@ -177,6 +178,9 @@ namespace Aaru.Core.Devices.Dumping
dskType = MediaTypeFromDevice.GetFromScsi((byte)_dev.ScsiType, _dev.Manufacturer, _dev.Model,
scsiMediumType, scsiDensityCode, blocks + 1, blockSize);
if(_dev.ScsiType == PeripheralDeviceTypes.MultiMediaDevice)
MMC.DetectDiscType(ref dskType, 1, null, _dev, out _, out _, 0);
switch(dskType)
{
// Hi-MD devices show the disks while in Hi-MD mode, but they cannot be read using any known command