From c1f7719765312f0367860b91bef13437b6946cfd Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 18 Apr 2020 18:20:43 +0100 Subject: [PATCH] Detect disc type when dumping non-CD MMC devices. Fixes #333 --- Aaru.Core/Devices/Dumping/SBC.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Aaru.Core/Devices/Dumping/SBC.cs b/Aaru.Core/Devices/Dumping/SBC.cs index cbfa90e5e..417b04558 100644 --- a/Aaru.Core/Devices/Dumping/SBC.cs +++ b/Aaru.Core/Devices/Dumping/SBC.cs @@ -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