REFACTOR: Fixed MOST name inconsistencies.

This commit is contained in:
2017-12-20 17:15:26 +00:00
parent 542520f5cd
commit a4650c61aa
428 changed files with 16205 additions and 16320 deletions

View File

@@ -38,7 +38,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class ATA
public static class Ata
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
@@ -50,11 +50,11 @@ namespace DiscImageChef.Core.Devices.Report
uint timeout = 5;
ConsoleKeyInfo pressedKey;
if(dev.IsUSB) USB.Report(dev, ref report, debug, ref removable);
if(dev.IsUsb) Usb.Report(dev, ref report, debug, ref removable);
if(dev.IsFireWire) FireWire.Report(dev, ref report, debug, ref removable);
if(dev.IsPCMCIA) PCMCIA.Report(dev, ref report, debug, ref removable);
if(dev.IsPcmcia) Pcmcia.Report(dev, ref report, debug, ref removable);
DicConsole.WriteLine("Querying ATA IDENTIFY...");

View File

@@ -36,7 +36,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
static class ATAPI
static class Atapi
{
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{

View File

@@ -36,7 +36,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
public static class NVMe
public static class Nvme
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{

View File

@@ -36,13 +36,13 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
static class PCMCIA
static class Pcmcia
{
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
report.PCMCIA = new pcmciaType();
report.PCMCIA.CIS = dev.CIS;
Tuple[] tuples = CIS.GetTuples(dev.CIS);
report.PCMCIA.CIS = dev.Cis;
Tuple[] tuples = CIS.GetTuples(dev.Cis);
if(tuples != null)
{
foreach(Tuple tuple in tuples)

View File

@@ -52,13 +52,13 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
uint timeout = 5;
ConsoleKeyInfo pressedKey;
if(dev.IsUSB) USB.Report(dev, ref report, debug, ref removable);
if(dev.IsUsb) Usb.Report(dev, ref report, debug, ref removable);
if(dev.IsFireWire) FireWire.Report(dev, ref report, debug, ref removable);
if(dev.IsPCMCIA) PCMCIA.Report(dev, ref report, debug, ref removable);
if(dev.IsPcmcia) Pcmcia.Report(dev, ref report, debug, ref removable);
if(!dev.IsUSB && !dev.IsFireWire && dev.IsRemovable)
if(!dev.IsUsb && !dev.IsFireWire && dev.IsRemovable)
{
pressedKey = new ConsoleKeyInfo();
while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N)
@@ -71,7 +71,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
removable = pressedKey.Key == ConsoleKey.Y;
}
if(dev.Type == DeviceType.ATAPI) ATAPI.Report(dev, ref report, debug, ref removable);
if(dev.Type == DeviceType.ATAPI) Atapi.Report(dev, ref report, debug, ref removable);
DicConsole.WriteLine("Querying SCSI INQUIRY...");
sense = dev.ScsiInquiry(out buffer, out senseBuffer);
@@ -209,12 +209,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(removable)
{
if(dev.SCSIType == Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
if(dev.ScsiType == Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
{
dev.AllowMediumRemoval(out senseBuffer, timeout, out duration);
dev.EjectTray(out senseBuffer, timeout, out duration);
}
else if(dev.SCSIType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
else if(dev.ScsiType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
{
dev.SpcAllowMediumRemoval(out senseBuffer, timeout, out duration);
DicConsole.WriteLine("Asking drive to unload tape (can take a few minutes)...");
@@ -225,7 +225,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
}
Decoders.SCSI.Modes.DecodedMode? decMode = null;
Decoders.SCSI.PeripheralDeviceTypes devType = dev.SCSIType;
Decoders.SCSI.PeripheralDeviceTypes devType = dev.ScsiType;
DicConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (10)...");
sense = dev.ModeSense10(out byte[] mode10Buffer, out senseBuffer, false, true,
@@ -317,10 +317,10 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
List<string> mediaTypes = new List<string>();
if(dev.SCSIType == Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
MMC.Report(dev, ref report, debug, ref cdromMode, ref mediaTypes);
else if(dev.SCSIType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
SSC.Report(dev, ref report, debug);
if(dev.ScsiType == Decoders.SCSI.PeripheralDeviceTypes.MultiMediaDevice)
Mmc.Report(dev, ref report, debug, ref cdromMode, ref mediaTypes);
else if(dev.ScsiType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
Ssc.Report(dev, ref report, debug);
else
{
if(removable)
@@ -440,7 +440,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense10 = true;
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.SCSIType);
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.ScsiType);
if(debug) mediaTest.ModeSense10Data = buffer;
}
@@ -450,7 +450,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
{
report.SCSI.SupportsModeSense6 = true;
if(!decMode.HasValue)
decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.SCSIType);
decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.ScsiType);
if(debug) mediaTest.ModeSense6Data = buffer;
}
@@ -715,7 +715,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense10 = true;
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.SCSIType);
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.ScsiType);
if(debug) report.SCSI.ReadCapabilities.ModeSense10Data = buffer;
}
@@ -724,7 +724,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense6 = true;
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.SCSIType);
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.ScsiType);
if(debug) report.SCSI.ReadCapabilities.ModeSense6Data = buffer;
}

View File

@@ -39,7 +39,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report.SCSI
{
internal static class MMC
internal static class Mmc
{
internal static void Report(Device dev, ref DeviceReport report, bool debug,
ref Decoders.SCSI.Modes.ModePage_2A? cdromMode, ref List<string> mediaTypes)
@@ -733,12 +733,12 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
}
}
bool tryPlextor = false, tryHLDTST = false, tryPioneer = false, tryNEC = false;
bool tryPlextor = false, tryHldtst = false, tryPioneer = false, tryNec = false;
tryPlextor |= dev.Manufacturer.ToLowerInvariant() == "plextor";
tryHLDTST |= dev.Manufacturer.ToLowerInvariant() == "hl-dt-st";
tryHldtst |= dev.Manufacturer.ToLowerInvariant() == "hl-dt-st";
tryPioneer |= dev.Manufacturer.ToLowerInvariant() == "pioneer";
tryNEC |= dev.Manufacturer.ToLowerInvariant() == "nec";
tryNec |= dev.Manufacturer.ToLowerInvariant() == "nec";
// Very old CD drives do not contain mode page 2Ah neither GET CONFIGURATION, so just try all CDs on them
// Also don't get confident, some drives didn't know CD-RW but are able to read them
@@ -871,7 +871,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense10 = true;
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.SCSIType);
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.ScsiType);
if(debug) mediaTest.ModeSense10Data = buffer;
}
DicConsole.WriteLine("Querying SCSI MODE SENSE...");
@@ -879,7 +879,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense6 = true;
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.SCSIType);
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.ScsiType);
if(debug) mediaTest.ModeSense6Data = buffer;
}
@@ -947,7 +947,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadDMISpecified = true;
DicConsole.WriteLine("Querying DVD PFI...");
mediaTest.CanReadPFI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.PhysicalInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPFI);
@@ -957,7 +957,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Querying DVD DMI...");
mediaTest.CanReadDMI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DiscManufacturingInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDMI);
@@ -972,7 +972,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadCMISpecified = true;
DicConsole.WriteLine("Querying DVD CMI...");
mediaTest.CanReadCMI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.CopyrightInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCMI);
@@ -987,7 +987,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadBCASpecified = true;
DicConsole.WriteLine("Querying DVD BCA...");
mediaTest.CanReadBCA =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.BurstCuttingArea, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA);
@@ -998,8 +998,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadAACSSpecified = true;
DicConsole.WriteLine("Querying DVD AACS...");
mediaTest.CanReadAACS =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVD_AACS, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdAacs, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadAACS);
if(debug)
DataFile.WriteTo("SCSI Report", "aacs",
@@ -1012,8 +1012,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadBCASpecified = true;
DicConsole.WriteLine("Querying BD BCA...");
mediaTest.CanReadBCA =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.BD, 0, 0,
MmcDiscStructureFormat.BD_BurstCuttingArea, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
MmcDiscStructureFormat.BdBurstCuttingArea, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA);
if(debug)
@@ -1027,16 +1027,16 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadDDSSpecified = true;
mediaTest.CanReadSpareAreaInformationSpecified = true;
mediaTest.CanReadDDS =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVDRAM_DDS, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdramDds, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS);
if(debug)
DataFile.WriteTo("SCSI Report", "dds",
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
mediaType + ".bin", "read results", buffer);
mediaTest.CanReadSpareAreaInformation =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVDRAM_SpareAreaInformation, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdramSpareAreaInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadSpareAreaInformation);
@@ -1052,8 +1052,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadSpareAreaInformationSpecified = true;
DicConsole.WriteLine("Querying BD DDS...");
mediaTest.CanReadDDS =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.BD, 0, 0,
MmcDiscStructureFormat.BD_DDS, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
MmcDiscStructureFormat.BdDds, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS);
if(debug)
DataFile.WriteTo("SCSI Report", "bddds",
@@ -1061,8 +1061,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Querying BD SAI...");
mediaTest.CanReadSpareAreaInformation =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.BD, 0, 0,
MmcDiscStructureFormat.BD_SpareAreaInformation, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
MmcDiscStructureFormat.BdSpareAreaInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadSpareAreaInformation);
@@ -1077,7 +1077,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadPRISpecified = true;
DicConsole.WriteLine("Querying DVD PRI...");
mediaTest.CanReadPRI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.PreRecordedInfo, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPRI);
@@ -1093,8 +1093,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadRecordablePFISpecified = true;
DicConsole.WriteLine("Querying DVD Media ID...");
mediaTest.CanReadMediaID =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVDR_MediaIdentifier, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdrMediaIdentifier, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadMediaID);
if(debug)
@@ -1103,8 +1103,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Querying DVD Embossed PFI...");
mediaTest.CanReadRecordablePFI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVDR_PhysicalInformation, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdrPhysicalInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRecordablePFI);
if(debug)
@@ -1119,8 +1119,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadDCBSpecified = true;
DicConsole.WriteLine("Querying DVD ADIP...");
mediaTest.CanReadADIP =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.ADIP, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.Adip, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadADIP);
if(debug)
DataFile.WriteTo("SCSI Report", "adip",
@@ -1128,8 +1128,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Querying DVD DCB...");
mediaTest.CanReadDCB =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DCB, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.Dcb, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDCB);
if(debug)
DataFile.WriteTo("SCSI Report", "dcb",
@@ -1142,8 +1142,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadHDCMISpecified = true;
DicConsole.WriteLine("Querying HD DVD CMI...");
mediaTest.CanReadHDCMI =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.HDDVD_CopyrightInformation, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.HddvdCopyrightInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadHDCMI);
if(debug)
@@ -1157,8 +1157,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadLayerCapacitySpecified = true;
DicConsole.WriteLine("Querying DVD Layer Capacity...");
mediaTest.CanReadLayerCapacity =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.DVD, 0, 0,
MmcDiscStructureFormat.DVDR_LayerCapacity, 0, timeout,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0,
MmcDiscStructureFormat.DvdrLayerCapacity, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLayerCapacity);
if(debug)
@@ -1173,7 +1173,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.CanReadPACSpecified = true;
DicConsole.WriteLine("Querying BD Disc Information...");
mediaTest.CanReadDiscInformation =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.BD, 0, 0,
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
MmcDiscStructureFormat.DiscInformation, 0, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDiscInformation);
@@ -1183,8 +1183,8 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Querying BD PAC...");
mediaTest.CanReadPAC =
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.BD, 0, 0,
MmcDiscStructureFormat.PAC, 0, timeout, out duration);
!dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0,
MmcDiscStructureFormat.Pac, 0, timeout, out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPAC);
if(debug)
DataFile.WriteTo("SCSI Report", "pac",
@@ -1268,7 +1268,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
{
DicConsole.WriteLine("Trying SCSI READ CD...");
mediaTest.SupportsReadCd = !dev.ReadCd(out buffer, out senseBuffer, 0, 2352, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.None, MmcSubchannel.None, timeout,
out duration);
@@ -1279,7 +1279,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
DicConsole.WriteLine("Trying SCSI READ CD MSF...");
mediaTest.SupportsReadCdMsf = !dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000200,
0x00000201, 2352, MmcSectorTypes.CDDA,
0x00000201, 2352, MmcSectorTypes.Cdda,
false, false, MmcHeaderCodes.None, true,
false, MmcErrorField.None,
MmcSubchannel.None, timeout, out duration);
@@ -1346,7 +1346,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
{
if(mediaType == "Audio CD")
sense = dev.ReadCd(out buffer, out senseBuffer, (uint)i, 2352, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false, MmcErrorField.None,
MmcSubchannel.None, timeout, out duration);
else
@@ -1370,7 +1370,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(mediaType == "Audio CD")
mediaTest.CanReadLeadOut = !dev.ReadCd(out buffer, out senseBuffer,
(uint)(mediaTest.Blocks + 1), 2352, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.None, MmcSubchannel.None,
timeout, out duration);
@@ -1392,13 +1392,13 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
{
DicConsole.WriteLine("Trying to read C2 Pointers...");
mediaTest.CanReadC2Pointers = !dev.ReadCd(out buffer, out senseBuffer, 0, 2646, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.C2Pointers, MmcSubchannel.None,
timeout, out duration);
if(!mediaTest.CanReadC2Pointers)
mediaTest.CanReadC2Pointers = !dev.ReadCd(out buffer, out senseBuffer, 0, 2648, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.C2PointersAndBlock,
MmcSubchannel.None, timeout,
@@ -1411,7 +1411,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
DicConsole.WriteLine("Trying to read subchannels...");
mediaTest.CanReadPQSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2368, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.None, MmcSubchannel.Q16,
timeout, out duration);
@@ -1421,7 +1421,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
mediaType + ".bin", "read results", buffer);
mediaTest.CanReadRWSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448, 1,
MmcSectorTypes.CDDA, false, false, false,
MmcSectorTypes.Cdda, false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.None, MmcSubchannel.Raw,
timeout, out duration);
@@ -1431,10 +1431,10 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
"_debug_" + report.SCSI.Inquiry.ProductIdentification + "_" +
mediaType + ".bin", "read results", buffer);
mediaTest.CanReadCorrectedSubchannel = !dev.ReadCd(out buffer, out senseBuffer, 0, 2448,
1, MmcSectorTypes.CDDA, false, false,
1, MmcSectorTypes.Cdda, false, false,
false, MmcHeaderCodes.None, true,
false, MmcErrorField.None,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannel);
@@ -1445,14 +1445,14 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
DicConsole.WriteLine("Trying to read subchannels with C2 Pointers...");
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2662,
1, MmcSectorTypes.CDDA, false, false,
1, MmcSectorTypes.Cdda, false, false,
false, MmcHeaderCodes.None, true,
false, MmcErrorField.C2Pointers,
MmcSubchannel.Q16, timeout,
out duration);
if(!mediaTest.CanReadPQSubchannelWithC2)
mediaTest.CanReadPQSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
2664, 1, MmcSectorTypes.CDDA,
2664, 1, MmcSectorTypes.Cdda,
false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.C2PointersAndBlock,
@@ -1466,14 +1466,14 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0, 2712,
1, MmcSectorTypes.CDDA, false, false,
1, MmcSectorTypes.Cdda, false, false,
false, MmcHeaderCodes.None, true,
false, MmcErrorField.C2Pointers,
MmcSubchannel.Raw, timeout,
out duration);
if(!mediaTest.CanReadRWSubchannelWithC2)
mediaTest.CanReadRWSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
2714, 1, MmcSectorTypes.CDDA,
2714, 1, MmcSectorTypes.Cdda,
false, false, false,
MmcHeaderCodes.None, true, false,
MmcErrorField.C2PointersAndBlock,
@@ -1487,18 +1487,18 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
mediaTest.CanReadCorrectedSubchannelWithC2 = !dev.ReadCd(out buffer, out senseBuffer, 0,
2712, 1, MmcSectorTypes.CDDA,
2712, 1, MmcSectorTypes.Cdda,
false, false, false,
MmcHeaderCodes.None, true,
false,
MmcErrorField.C2Pointers,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
mediaTest.CanReadCorrectedSubchannelWithC2 =
!dev.ReadCd(out buffer, out senseBuffer, 0, 2714, 1, MmcSectorTypes.CDDA, false,
!dev.ReadCd(out buffer, out senseBuffer, 0, 2714, 1, MmcSectorTypes.Cdda, false,
false, false, MmcHeaderCodes.None, true, false,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.RW, timeout,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannelWithC2);
@@ -1554,7 +1554,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
false, true,
MmcHeaderCodes.AllHeaders, true,
true, MmcErrorField.None,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannel);
@@ -1617,13 +1617,13 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
MmcHeaderCodes.AllHeaders,
true, true,
MmcErrorField.C2Pointers,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
mediaTest.CanReadCorrectedSubchannelWithC2 =
!dev.ReadCd(out buffer, out senseBuffer, 0, 2714, 1, MmcSectorTypes.AllTypes,
false, false, true, MmcHeaderCodes.AllHeaders, true, true,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.RW, timeout,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannelWithC2);
@@ -1678,7 +1678,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
1, MmcSectorTypes.AllTypes, false,
false, false, MmcHeaderCodes.None,
true, false, MmcErrorField.None,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannel);
@@ -1737,13 +1737,13 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
MmcHeaderCodes.None, true,
false,
MmcErrorField.C2Pointers,
MmcSubchannel.RW, timeout,
MmcSubchannel.Rw, timeout,
out duration);
if(!mediaTest.CanReadCorrectedSubchannelWithC2)
mediaTest.CanReadCorrectedSubchannelWithC2 =
!dev.ReadCd(out buffer, out senseBuffer, 0, 2440, 1, MmcSectorTypes.AllTypes,
false, false, false, MmcHeaderCodes.None, true, false,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.RW, timeout,
MmcErrorField.C2PointersAndBlock, MmcSubchannel.Rw, timeout,
out duration);
DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}",
!mediaTest.CanReadCorrectedSubchannelWithC2);
@@ -1755,7 +1755,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(debug)
{
if(!tryNEC)
if(!tryNec)
{
pressedKey = new ConsoleKeyInfo();
while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N)
@@ -1766,7 +1766,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
DicConsole.WriteLine();
}
tryNEC |= pressedKey.Key == ConsoleKey.Y;
tryNec |= pressedKey.Key == ConsoleKey.Y;
}
if(!tryPioneer)
@@ -1825,7 +1825,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaType + ".bin", "read results", buffer);
}
if(tryNEC)
if(tryNec)
{
mediaTest.SupportsNECReadCDDASpecified = true;
DicConsole.WriteLine("Trying NEC READ CD-DA...");
@@ -1863,7 +1863,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(debug)
{
if(!tryHLDTST)
if(!tryHldtst)
{
pressedKey = new ConsoleKeyInfo();
while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N)
@@ -1874,7 +1874,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
DicConsole.WriteLine();
}
tryHLDTST |= pressedKey.Key == ConsoleKey.Y;
tryHldtst |= pressedKey.Key == ConsoleKey.Y;
}
}
@@ -1907,7 +1907,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
mediaTest.SupportsPlextorReadRawDVD = !ArrayHelpers.ArrayIsNullOrEmpty(buffer);
}
if(tryHLDTST)
if(tryHldtst)
{
mediaTest.SupportsHLDTSTReadRawDVDSpecified = true;
DicConsole.WriteLine("Trying HL-DT-ST (aka LG) trick to raw read DVDs...");

View File

@@ -38,7 +38,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report.SCSI
{
internal static class SSC
internal static class Ssc
{
internal static void Report(Device dev, ref DeviceReport report, bool debug)
{
@@ -57,23 +57,23 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
sense = dev.ReadBlockLimits(out buffer, out senseBuffer, timeout, out duration);
if(!sense)
{
Decoders.SCSI.SSC.BlockLimits.BlockLimitsData? decBL = Decoders.SCSI.SSC.BlockLimits.Decode(buffer);
if(decBL.HasValue)
Decoders.SCSI.SSC.BlockLimits.BlockLimitsData? decBl = Decoders.SCSI.SSC.BlockLimits.Decode(buffer);
if(decBl.HasValue)
{
if(decBL.Value.granularity > 0)
if(decBl.Value.granularity > 0)
{
report.SCSI.SequentialDevice.BlockSizeGranularitySpecified = true;
report.SCSI.SequentialDevice.BlockSizeGranularity = decBL.Value.granularity;
report.SCSI.SequentialDevice.BlockSizeGranularity = decBl.Value.granularity;
}
if(decBL.Value.maxBlockLen > 0)
if(decBl.Value.maxBlockLen > 0)
{
report.SCSI.SequentialDevice.MaxBlockLengthSpecified = true;
report.SCSI.SequentialDevice.MaxBlockLength = decBL.Value.maxBlockLen;
report.SCSI.SequentialDevice.MaxBlockLength = decBl.Value.maxBlockLen;
}
if(decBL.Value.minBlockLen > 0)
if(decBl.Value.minBlockLen > 0)
{
report.SCSI.SequentialDevice.MinBlockLengthSpecified = true;
report.SCSI.SequentialDevice.MinBlockLength = decBL.Value.minBlockLen;
report.SCSI.SequentialDevice.MinBlockLength = decBl.Value.minBlockLen;
}
}
}
@@ -225,7 +225,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense10 = true;
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.SCSIType);
decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, dev.ScsiType);
if(debug) seqTest.ModeSense10Data = buffer;
}
@@ -234,7 +234,7 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
if(!sense && !dev.Error)
{
report.SCSI.SupportsModeSense6 = true;
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.SCSIType);
if(!decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, dev.ScsiType);
if(debug) seqTest.ModeSense6Data = buffer;
}

View File

@@ -46,7 +46,7 @@ namespace DiscImageChef.Core.Devices.Report
else if(dev.Type == DeviceType.SecureDigital) report.SecureDigital = new mmcsdType();
DicConsole.WriteLine("Trying to get CID...");
bool sense = dev.ReadCID(out byte[] cid, out uint[] response, dev.Timeout, out double duration);
bool sense = dev.ReadCid(out byte[] cid, out uint[] response, dev.Timeout, out double duration);
if(!sense)
{
@@ -77,7 +77,7 @@ namespace DiscImageChef.Core.Devices.Report
else DicConsole.WriteLine("Could not read CID...");
DicConsole.WriteLine("Trying to get CSD...");
sense = dev.ReadCSD(out byte[] csd, out response, dev.Timeout, out duration);
sense = dev.ReadCsd(out byte[] csd, out response, dev.Timeout, out duration);
if(!sense)
{
@@ -91,7 +91,7 @@ namespace DiscImageChef.Core.Devices.Report
if(dev.Type == DeviceType.MMC)
{
DicConsole.WriteLine("Trying to get OCR...");
sense = dev.ReadOCR(out byte[] ocr, out response, dev.Timeout, out duration);
sense = dev.ReadOcr(out byte[] ocr, out response, dev.Timeout, out duration);
if(!sense)
{
@@ -101,7 +101,7 @@ namespace DiscImageChef.Core.Devices.Report
else DicConsole.WriteLine("Could not read OCR...");
DicConsole.WriteLine("Trying to get Extended CSD...");
sense = dev.ReadExtendedCSD(out byte[] ecsd, out response, dev.Timeout, out duration);
sense = dev.ReadExtendedCsd(out byte[] ecsd, out response, dev.Timeout, out duration);
if(!sense)
{
@@ -113,7 +113,7 @@ namespace DiscImageChef.Core.Devices.Report
else if(dev.Type == DeviceType.SecureDigital)
{
DicConsole.WriteLine("Trying to get OCR...");
sense = dev.ReadSDOCR(out byte[] ocr, out response, dev.Timeout, out duration);
sense = dev.ReadSdocr(out byte[] ocr, out response, dev.Timeout, out duration);
if(!sense)
{
@@ -123,7 +123,7 @@ namespace DiscImageChef.Core.Devices.Report
else DicConsole.WriteLine("Could not read OCR...");
DicConsole.WriteLine("Trying to get SCR...");
sense = dev.ReadSCR(out byte[] scr, out response, dev.Timeout, out duration);
sense = dev.ReadScr(out byte[] scr, out response, dev.Timeout, out duration);
if(!sense)
{

View File

@@ -37,7 +37,7 @@ using DiscImageChef.Metadata;
namespace DiscImageChef.Core.Devices.Report
{
static class USB
static class Usb
{
internal static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
@@ -54,10 +54,10 @@ namespace DiscImageChef.Core.Devices.Report
if(pressedKey.Key == ConsoleKey.Y)
{
report.USB = new usbType();
report.USB.Manufacturer = dev.USBManufacturerString;
report.USB.Product = dev.USBProductString;
report.USB.ProductID = dev.USBProductID;
report.USB.VendorID = dev.USBVendorID;
report.USB.Manufacturer = dev.UsbManufacturerString;
report.USB.Product = dev.UsbProductString;
report.USB.ProductID = dev.UsbProductId;
report.USB.VendorID = dev.UsbVendorId;
pressedKey = new ConsoleKeyInfo();
while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N)
@@ -69,7 +69,7 @@ namespace DiscImageChef.Core.Devices.Report
report.USB.RemovableMedia = pressedKey.Key == ConsoleKey.Y;
removable = report.USB.RemovableMedia;
if(debug) report.USB.Descriptors = dev.USBDescriptors;
if(debug) report.USB.Descriptors = dev.UsbDescriptors;
}
}
}