mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Refactor.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -47,44 +47,44 @@ namespace DiscImageChef.Server
|
||||
/// <param name="evpdPages">List to put the key=value pairs on</param>
|
||||
public static void Report(IEnumerable<ScsiPage> pages, string vendor, ref Dictionary<string, string> evpdPages)
|
||||
{
|
||||
foreach(ScsiPage evpd in pages)
|
||||
foreach (var evpd in pages)
|
||||
{
|
||||
string decoded;
|
||||
if(evpd.page >= 0x01 && evpd.page <= 0x7F) decoded = EVPD.DecodeASCIIPage(evpd.value);
|
||||
else if(evpd.page == 0x81) decoded = EVPD.PrettifyPage_81(evpd.value);
|
||||
else if(evpd.page == 0x82) decoded = EVPD.DecodePage82(evpd.value);
|
||||
else if(evpd.page == 0x83) decoded = EVPD.PrettifyPage_83(evpd.value);
|
||||
else if(evpd.page == 0x84) decoded = EVPD.PrettifyPage_84(evpd.value);
|
||||
else if(evpd.page == 0x85) decoded = EVPD.PrettifyPage_85(evpd.value);
|
||||
else if(evpd.page == 0x86) decoded = EVPD.PrettifyPage_86(evpd.value);
|
||||
else if(evpd.page == 0x89) decoded = EVPD.PrettifyPage_89(evpd.value);
|
||||
else if(evpd.page == 0xB0) decoded = EVPD.PrettifyPage_B0(evpd.value);
|
||||
else if(evpd.page == 0xB2)
|
||||
if (evpd.page >= 0x01 && evpd.page <= 0x7F) decoded = EVPD.DecodeASCIIPage(evpd.value);
|
||||
else if (evpd.page == 0x81) decoded = EVPD.PrettifyPage_81(evpd.value);
|
||||
else if (evpd.page == 0x82) decoded = EVPD.DecodePage82(evpd.value);
|
||||
else if (evpd.page == 0x83) decoded = EVPD.PrettifyPage_83(evpd.value);
|
||||
else if (evpd.page == 0x84) decoded = EVPD.PrettifyPage_84(evpd.value);
|
||||
else if (evpd.page == 0x85) decoded = EVPD.PrettifyPage_85(evpd.value);
|
||||
else if (evpd.page == 0x86) decoded = EVPD.PrettifyPage_86(evpd.value);
|
||||
else if (evpd.page == 0x89) decoded = EVPD.PrettifyPage_89(evpd.value);
|
||||
else if (evpd.page == 0xB0) decoded = EVPD.PrettifyPage_B0(evpd.value);
|
||||
else if (evpd.page == 0xB2)
|
||||
decoded =
|
||||
$"TapeAlert Supported Flags Bitmap: 0x{EVPD.DecodePageB2(evpd.value):X16}<br/>";
|
||||
else if(evpd.page == 0xB4) decoded = EVPD.DecodePageB4(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "quantum")
|
||||
else if (evpd.page == 0xB4) decoded = EVPD.DecodePageB4(evpd.value);
|
||||
else if (evpd.page == 0xC0 && vendor.Trim() == "quantum")
|
||||
decoded = EVPD.PrettifyPage_C0_Quantum(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "seagate")
|
||||
else if (evpd.page == 0xC0 && vendor.Trim() == "seagate")
|
||||
decoded =
|
||||
EVPD.PrettifyPage_C0_Seagate(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "ibm")
|
||||
else if (evpd.page == 0xC0 && vendor.Trim() == "ibm")
|
||||
decoded = EVPD.PrettifyPage_C0_IBM(evpd.value);
|
||||
else if(evpd.page == 0xC1 && vendor.Trim() == "ibm")
|
||||
else if (evpd.page == 0xC1 && vendor.Trim() == "ibm")
|
||||
decoded = EVPD.PrettifyPage_C1_IBM(evpd.value);
|
||||
else if((evpd.page == 0xC0 || evpd.page == 0xC1) && vendor.Trim() == "certance")
|
||||
else if ((evpd.page == 0xC0 || evpd.page == 0xC1) && vendor.Trim() == "certance")
|
||||
decoded = EVPD.PrettifyPage_C0_C1_Certance(evpd.value);
|
||||
else if((evpd.page == 0xC2 || evpd.page == 0xC3 || evpd.page == 0xC4 || evpd.page == 0xC5 ||
|
||||
evpd.page == 0xC6) &&
|
||||
vendor.Trim() == "certance") decoded = EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(evpd.value);
|
||||
else if((evpd.page == 0xC0 || evpd.page == 0xC1 || evpd.page == 0xC2 || evpd.page == 0xC3 ||
|
||||
evpd.page == 0xC4 || evpd.page == 0xC5) &&
|
||||
vendor.Trim() == "hp") decoded = EVPD.PrettifyPage_C0_to_C5_HP(evpd.value);
|
||||
else if(evpd.page == 0xDF && vendor.Trim() == "certance")
|
||||
decoded = EVPD.PrettifyPage_DF_Certance(evpd.value);
|
||||
else if ((evpd.page == 0xC2 || evpd.page == 0xC3 || evpd.page == 0xC4 || evpd.page == 0xC5 ||
|
||||
evpd.page == 0xC6) &&
|
||||
vendor.Trim() == "certance") decoded = EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(evpd.value);
|
||||
else if ((evpd.page == 0xC0 || evpd.page == 0xC1 || evpd.page == 0xC2 || evpd.page == 0xC3 ||
|
||||
evpd.page == 0xC4 || evpd.page == 0xC5) &&
|
||||
vendor.Trim() == "hp") decoded = EVPD.PrettifyPage_C0_to_C5_HP(evpd.value);
|
||||
else if (evpd.page == 0xDF && vendor.Trim() == "certance")
|
||||
decoded = EVPD.PrettifyPage_DF_Certance(evpd.value);
|
||||
else decoded = "Undecoded";
|
||||
|
||||
if(!string.IsNullOrEmpty(decoded)) decoded = decoded.Replace("\n", "<br/>");
|
||||
if (!string.IsNullOrEmpty(decoded)) decoded = decoded.Replace("\n", "<br/>");
|
||||
|
||||
evpdPages.Add($"EVPD page {evpd.page:X2}h", decoded);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ using DiscImageChef.Decoders.SCSI;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
static class ScsiInquiry
|
||||
internal static class ScsiInquiry
|
||||
{
|
||||
/// <summary>
|
||||
/// Takes the SCSI INQUIRY part of a device report and prints it as a list of values to be sequenced by ASP.NET in the
|
||||
@@ -45,13 +45,13 @@ namespace DiscImageChef.Server
|
||||
/// <returns>List of values</returns>
|
||||
internal static IEnumerable<string> Report(Inquiry.SCSIInquiry? inquiryNullable)
|
||||
{
|
||||
List<string> scsiOneValue = new List<string>();
|
||||
var scsiOneValue = new List<string>();
|
||||
|
||||
if(!inquiryNullable.HasValue) return scsiOneValue;
|
||||
if (!inquiryNullable.HasValue) return scsiOneValue;
|
||||
|
||||
Inquiry.SCSIInquiry inquiry = inquiryNullable.Value;
|
||||
var inquiry = inquiryNullable.Value;
|
||||
|
||||
switch((PeripheralQualifiers)inquiry.PeripheralQualifier)
|
||||
switch ((PeripheralQualifiers) inquiry.PeripheralQualifier)
|
||||
{
|
||||
case PeripheralQualifiers.Supported:
|
||||
scsiOneValue.Add("Device is connected and supported.");
|
||||
@@ -70,7 +70,7 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
switch((PeripheralDeviceTypes)inquiry.PeripheralDeviceType)
|
||||
switch ((PeripheralDeviceTypes) inquiry.PeripheralDeviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
||||
scsiOneValue.Add("Direct-access device");
|
||||
@@ -146,7 +146,7 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
switch((ANSIVersions)inquiry.ANSIVersion)
|
||||
switch ((ANSIVersions) inquiry.ANSIVersion)
|
||||
{
|
||||
case ANSIVersions.ANSINoVersion:
|
||||
scsiOneValue.Add("Device does not claim to comply with any SCSI ANSI standard");
|
||||
@@ -171,11 +171,12 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
default:
|
||||
scsiOneValue
|
||||
.Add($"Device claims to comply with unknown SCSI ANSI standard value 0x{inquiry.ANSIVersion:X2})");
|
||||
.Add(
|
||||
$"Device claims to comply with unknown SCSI ANSI standard value 0x{inquiry.ANSIVersion:X2})");
|
||||
break;
|
||||
}
|
||||
|
||||
switch((ECMAVersions)inquiry.ECMAVersion)
|
||||
switch ((ECMAVersions) inquiry.ECMAVersion)
|
||||
{
|
||||
case ECMAVersions.ECMANoVersion:
|
||||
scsiOneValue.Add("Device does not claim to comply with any SCSI ECMA standard");
|
||||
@@ -185,11 +186,12 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
default:
|
||||
scsiOneValue
|
||||
.Add($"Device claims to comply with unknown SCSI ECMA standard value 0x{inquiry.ECMAVersion:X2})");
|
||||
.Add(
|
||||
$"Device claims to comply with unknown SCSI ECMA standard value 0x{inquiry.ECMAVersion:X2})");
|
||||
break;
|
||||
}
|
||||
|
||||
switch((ISOVersions)inquiry.ISOVersion)
|
||||
switch ((ISOVersions) inquiry.ISOVersion)
|
||||
{
|
||||
case ISOVersions.ISONoVersion:
|
||||
scsiOneValue.Add("Device does not claim to comply with any SCSI ISO/IEC standard");
|
||||
@@ -199,38 +201,39 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
default:
|
||||
scsiOneValue
|
||||
.Add($"Device claims to comply with unknown SCSI ISO/IEC standard value 0x{inquiry.ISOVersion:X2})");
|
||||
.Add(
|
||||
$"Device claims to comply with unknown SCSI ISO/IEC standard value 0x{inquiry.ISOVersion:X2})");
|
||||
break;
|
||||
}
|
||||
|
||||
if(inquiry.RMB) scsiOneValue.Add("Device is removable");
|
||||
if(inquiry.AERC) scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
||||
if(inquiry.TrmTsk) scsiOneValue.Add("Device supports TERMINATE TASK command");
|
||||
if(inquiry.NormACA) scsiOneValue.Add("Device supports setting Normal ACA");
|
||||
if(inquiry.HiSup) scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
||||
if(inquiry.SCCS) scsiOneValue.Add("Device contains an embedded storage array controller");
|
||||
if(inquiry.ACC) scsiOneValue.Add("Device contains an Access Control Coordinator");
|
||||
if(inquiry.ThreePC) scsiOneValue.Add("Device supports third-party copy commands");
|
||||
if(inquiry.Protect) scsiOneValue.Add("Device supports protection information");
|
||||
if(inquiry.BQue) scsiOneValue.Add("Device supports basic queueing");
|
||||
if(inquiry.EncServ) scsiOneValue.Add("Device contains an embedded enclosure services component");
|
||||
if(inquiry.MultiP) scsiOneValue.Add("Multi-port device");
|
||||
if(inquiry.MChngr) scsiOneValue.Add("Device contains or is attached to a medium changer");
|
||||
if(inquiry.ACKREQQ) scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
||||
if(inquiry.Addr32) scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
||||
if(inquiry.Addr16) scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
||||
if(inquiry.RelAddr) scsiOneValue.Add("Device supports relative addressing");
|
||||
if(inquiry.WBus32) scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
||||
if(inquiry.WBus16) scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
||||
if(inquiry.Sync) scsiOneValue.Add("Device supports synchronous data transfer");
|
||||
if(inquiry.Linked) scsiOneValue.Add("Device supports linked commands");
|
||||
if(inquiry.TranDis) scsiOneValue.Add("Device supports CONTINUE TASK and TARGET TRANSFER DISABLE commands");
|
||||
if(inquiry.QAS) scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
||||
if(inquiry.CmdQue) scsiOneValue.Add("Device supports TCQ queue");
|
||||
if(inquiry.IUS) scsiOneValue.Add("Device supports information unit transfers");
|
||||
if(inquiry.SftRe) scsiOneValue.Add("Device implements RESET as a soft reset");
|
||||
if (inquiry.RMB) scsiOneValue.Add("Device is removable");
|
||||
if (inquiry.AERC) scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
||||
if (inquiry.TrmTsk) scsiOneValue.Add("Device supports TERMINATE TASK command");
|
||||
if (inquiry.NormACA) scsiOneValue.Add("Device supports setting Normal ACA");
|
||||
if (inquiry.HiSup) scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
||||
if (inquiry.SCCS) scsiOneValue.Add("Device contains an embedded storage array controller");
|
||||
if (inquiry.ACC) scsiOneValue.Add("Device contains an Access Control Coordinator");
|
||||
if (inquiry.ThreePC) scsiOneValue.Add("Device supports third-party copy commands");
|
||||
if (inquiry.Protect) scsiOneValue.Add("Device supports protection information");
|
||||
if (inquiry.BQue) scsiOneValue.Add("Device supports basic queueing");
|
||||
if (inquiry.EncServ) scsiOneValue.Add("Device contains an embedded enclosure services component");
|
||||
if (inquiry.MultiP) scsiOneValue.Add("Multi-port device");
|
||||
if (inquiry.MChngr) scsiOneValue.Add("Device contains or is attached to a medium changer");
|
||||
if (inquiry.ACKREQQ) scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
||||
if (inquiry.Addr32) scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
||||
if (inquiry.Addr16) scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
||||
if (inquiry.RelAddr) scsiOneValue.Add("Device supports relative addressing");
|
||||
if (inquiry.WBus32) scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
||||
if (inquiry.WBus16) scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
||||
if (inquiry.Sync) scsiOneValue.Add("Device supports synchronous data transfer");
|
||||
if (inquiry.Linked) scsiOneValue.Add("Device supports linked commands");
|
||||
if (inquiry.TranDis) scsiOneValue.Add("Device supports CONTINUE TASK and TARGET TRANSFER DISABLE commands");
|
||||
if (inquiry.QAS) scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
||||
if (inquiry.CmdQue) scsiOneValue.Add("Device supports TCQ queue");
|
||||
if (inquiry.IUS) scsiOneValue.Add("Device supports information unit transfers");
|
||||
if (inquiry.SftRe) scsiOneValue.Add("Device implements RESET as a soft reset");
|
||||
|
||||
switch((TGPSValues)inquiry.TPGS)
|
||||
switch ((TGPSValues) inquiry.TPGS)
|
||||
{
|
||||
case TGPSValues.NotSupported:
|
||||
scsiOneValue.Add("Device does not support assymetrical access");
|
||||
@@ -249,7 +252,7 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
switch((SPIClocking)inquiry.Clocking)
|
||||
switch ((SPIClocking) inquiry.Clocking)
|
||||
{
|
||||
case SPIClocking.ST:
|
||||
scsiOneValue.Add("Device supports only ST clocking");
|
||||
@@ -268,10 +271,10 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
if(inquiry.VersionDescriptors == null) return scsiOneValue;
|
||||
if (inquiry.VersionDescriptors == null) return scsiOneValue;
|
||||
|
||||
foreach(ushort versionDescriptor in inquiry.VersionDescriptors)
|
||||
switch(versionDescriptor)
|
||||
foreach (var versionDescriptor in inquiry.VersionDescriptors)
|
||||
switch (versionDescriptor)
|
||||
{
|
||||
case 0xFFFF:
|
||||
case 0x0000: break;
|
||||
@@ -403,11 +406,12 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x01DD:
|
||||
scsiOneValue
|
||||
.Add("Device complies with SES T10/1212 revision 08b w/ Amendment ANSI INCITS.305/AM1-2000");
|
||||
.Add(
|
||||
"Device complies with SES T10/1212 revision 08b w/ Amendment ANSI INCITS.305/AM1-2000");
|
||||
break;
|
||||
case 0x01DE:
|
||||
scsiOneValue
|
||||
.Add("Device complies with SES ANSI INCITS 305-1998 w/ Amendment ANSI INCITS.305/AM1-2000");
|
||||
.Add("Device complies with SES ANSI INCITS 305-1998 w/ Amendment ANSI INCITS.305/AM1-2000");
|
||||
break;
|
||||
case 0x01E0:
|
||||
scsiOneValue.Add("Device complies with SCC-2 (no version claimed)");
|
||||
@@ -744,7 +748,8 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x04E7:
|
||||
scsiOneValue
|
||||
.Add("Device complies with MMC-6 ANSI INCITS 468-2010 + MMC-6/AM1 ANSI INCITS 468-2010/AM 1");
|
||||
.Add(
|
||||
"Device complies with MMC-6 ANSI INCITS 468-2010 + MMC-6/AM1 ANSI INCITS 468-2010/AM 1");
|
||||
break;
|
||||
case 0x0500:
|
||||
scsiOneValue.Add("Device complies with ADC-3 (no version claimed)");
|
||||
@@ -1033,7 +1038,8 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x0ABC:
|
||||
scsiOneValue
|
||||
.Add("Device complies with SPI ANSI INCITS 253-1995 with SPI Amnd ANSI INCITS 253/AM1-1998");
|
||||
.Add(
|
||||
"Device complies with SPI ANSI INCITS 253-1995 with SPI Amnd ANSI INCITS 253/AM1-1998");
|
||||
break;
|
||||
case 0x0AC0:
|
||||
scsiOneValue.Add("Device complies with Fast-20 (no version claimed)");
|
||||
@@ -1175,7 +1181,8 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x0C4F:
|
||||
scsiOneValue
|
||||
.Add("Device complies with SAS-2.1 ANSI INCITS 478-2011 w/ Amnd 1 ANSI INCITS 478/AM1-2014");
|
||||
.Add(
|
||||
"Device complies with SAS-2.1 ANSI INCITS 478-2011 w/ Amnd 1 ANSI INCITS 478/AM1-2014");
|
||||
break;
|
||||
case 0x0C52:
|
||||
scsiOneValue.Add("Device complies with SAS-2.1 ISO/IEC 14776-153");
|
||||
@@ -1203,7 +1210,8 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x0D3C:
|
||||
scsiOneValue
|
||||
.Add("Device complies with FC-PH ANSI INCITS 230-1994 with Amnd 1 ANSI INCITS 230/AM1-1996");
|
||||
.Add(
|
||||
"Device complies with FC-PH ANSI INCITS 230-1994 with Amnd 1 ANSI INCITS 230/AM1-1996");
|
||||
break;
|
||||
case 0x0D40:
|
||||
scsiOneValue.Add("Device complies with FC-AL (no version claimed)");
|
||||
@@ -1276,7 +1284,7 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x0E03:
|
||||
scsiOneValue
|
||||
.Add("Device complies with FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007");
|
||||
.Add("Device complies with FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007");
|
||||
break;
|
||||
case 0x0E20:
|
||||
scsiOneValue.Add("Device complies with FC-LS (no version claimed)");
|
||||
@@ -1334,7 +1342,8 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x0EA6:
|
||||
scsiOneValue
|
||||
.Add("Device complies with FC 10GFC ANSI INCITS 364-2003 with AM1 ANSI INCITS 364/AM1-2007");
|
||||
.Add(
|
||||
"Device complies with FC 10GFC ANSI INCITS 364-2003 with AM1 ANSI INCITS 364/AM1-2007");
|
||||
break;
|
||||
case 0x0EC0:
|
||||
scsiOneValue.Add("Device complies with FC-SP-2 (no version claimed)");
|
||||
@@ -1515,22 +1524,23 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x1621:
|
||||
scsiOneValue
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-APT Parallel Transport (no version claimed)");
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-APT Parallel Transport (no version claimed)");
|
||||
break;
|
||||
case 0x1622:
|
||||
scsiOneValue
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-AST Serial Transport (no version claimed)");
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-AST Serial Transport (no version claimed)");
|
||||
break;
|
||||
case 0x1623:
|
||||
scsiOneValue
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-ACS ATA/ATAPI Command Set (no version claimed)");
|
||||
.Add(
|
||||
"Device complies with ATA/ATAPI-8 ATA8-ACS ATA/ATAPI Command Set (no version claimed)");
|
||||
break;
|
||||
case 0x1628:
|
||||
scsiOneValue.Add("Device complies with ATA/ATAPI-8 ATA8-AAM ANSI INCITS 451-2008");
|
||||
break;
|
||||
case 0x162A:
|
||||
scsiOneValue
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-ACS ANSI INCITS 452-2009 w/ Amendment 1");
|
||||
.Add("Device complies with ATA/ATAPI-8 ATA8-ACS ANSI INCITS 452-2009 w/ Amendment 1");
|
||||
break;
|
||||
case 0x1728:
|
||||
scsiOneValue.Add("Device complies with Universal Serial Bus Specification, Revision 1.1");
|
||||
@@ -1540,7 +1550,7 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
case 0x1730:
|
||||
scsiOneValue
|
||||
.Add("Device complies with USB Mass Storage Class Bulk-Only Transport, Revision 1.0");
|
||||
.Add("Device complies with USB Mass Storage Class Bulk-Only Transport, Revision 1.0");
|
||||
break;
|
||||
case 0x1740:
|
||||
scsiOneValue.Add("Device complies with UAS (no version claimed)");
|
||||
|
||||
@@ -46,93 +46,96 @@ namespace DiscImageChef.Server
|
||||
/// <param name="mmcOneValue">List to put the values on</param>
|
||||
public static void Report(MmcFeatures ftr, ref List<string> mmcOneValue)
|
||||
{
|
||||
if(ftr.SupportsAACS && ftr.AACSVersion.HasValue)
|
||||
if (ftr.SupportsAACS && ftr.AACSVersion.HasValue)
|
||||
mmcOneValue.Add($"Drive supports AACS version {ftr.AACSVersion}");
|
||||
else if(ftr.SupportsAACS) mmcOneValue.Add("Drive supports AACS");
|
||||
if(ftr.AGIDs.HasValue) mmcOneValue.Add($"Drive supports {ftr.AGIDs} AGIDs concurrently");
|
||||
if(ftr.CanGenerateBindingNonce)
|
||||
else if (ftr.SupportsAACS) mmcOneValue.Add("Drive supports AACS");
|
||||
if (ftr.AGIDs.HasValue) mmcOneValue.Add($"Drive supports {ftr.AGIDs} AGIDs concurrently");
|
||||
if (ftr.CanGenerateBindingNonce)
|
||||
{
|
||||
mmcOneValue.Add("Drive supports generating the binding nonce");
|
||||
if(ftr.BindingNonceBlocks.HasValue)
|
||||
if (ftr.BindingNonceBlocks.HasValue)
|
||||
mmcOneValue.Add($"{ftr.BindingNonceBlocks} media blocks are required for the binding nonce");
|
||||
}
|
||||
|
||||
if(ftr.BlocksPerReadableUnit > 1)
|
||||
if (ftr.BlocksPerReadableUnit > 1)
|
||||
mmcOneValue.Add($"{ftr.BlocksPerReadableUnit} logical blocks per media writable unit");
|
||||
if(ftr.BufferUnderrunFreeInDVD) mmcOneValue.Add("Drive supports zero loss linking writing DVDs");
|
||||
if(ftr.BufferUnderrunFreeInSAO) mmcOneValue.Add("Drive supports zero loss linking in Session at Once Mode");
|
||||
if(ftr.BufferUnderrunFreeInTAO) mmcOneValue.Add("Drive supports zero loss linking in Track at Once Mode");
|
||||
if(ftr.CanAudioScan) mmcOneValue.Add("Drive supports the SCAN command");
|
||||
if(ftr.CanEject) mmcOneValue.Add("Drive can eject media");
|
||||
if(ftr.CanEraseSector) mmcOneValue.Add("Drive supports media that require erasing before writing");
|
||||
if(ftr.CanExpandBDRESpareArea) mmcOneValue.Add("Drive can expand the spare area on a formatted BD-RE disc");
|
||||
if(ftr.CanFormat) mmcOneValue.Add("Drive can format media into logical blocks");
|
||||
if(ftr.CanFormatBDREWithoutSpare) mmcOneValue.Add("Drive can format BD-RE with no spares allocated");
|
||||
if(ftr.CanFormatQCert) mmcOneValue.Add("Drive can format BD-RE discs with quick certification");
|
||||
if(ftr.CanFormatCert) mmcOneValue.Add("Drive can format BD-RE discs with full certification");
|
||||
if(ftr.CanFormatFRF) mmcOneValue.Add("Drive can fast re-format BD-RE discs");
|
||||
if(ftr.CanFormatRRM) mmcOneValue.Add("Drive can format BD-R discs with RRM format");
|
||||
if(ftr.CanLoad) mmcOneValue.Add("Drive can load media");
|
||||
if(ftr.CanMuteSeparateChannels) mmcOneValue.Add("Drive is able to mute channels separately");
|
||||
if(ftr.CanOverwriteSAOTrack) mmcOneValue.Add("Drive can overwrite a SAO track with another in CD-RWs");
|
||||
if(ftr.CanOverwriteTAOTrack) mmcOneValue.Add("Drive can overwrite a TAO track with another in CD-RWs");
|
||||
if(ftr.CanPlayCDAudio) mmcOneValue.Add("Drive has an analogue audio output");
|
||||
if(ftr.CanPseudoOverwriteBDR) mmcOneValue.Add("Drive can write BD-R on Pseudo-OVerwrite SRM mode");
|
||||
if(ftr.CanReadAllDualR) mmcOneValue.Add("Drive can read DVD-R DL from all recording modes");
|
||||
if(ftr.CanReadAllDualRW) mmcOneValue.Add("Drive can read DVD-RW DL from all recording modes");
|
||||
if(ftr.CanReadBD) mmcOneValue.Add("Drive can read BD-ROM");
|
||||
if(ftr.CanReadBDR) mmcOneValue.Add("Drive can read BD-R Ver.1");
|
||||
if(ftr.CanReadBDRE1) mmcOneValue.Add("Drive can read BD-RE Ver.1");
|
||||
if(ftr.CanReadBDRE2) mmcOneValue.Add("Drive can read BD-RE Ver.2");
|
||||
if(ftr.CanReadBDROM) mmcOneValue.Add("Drive can read BD-ROM Ver.1");
|
||||
if(ftr.CanReadBluBCA) mmcOneValue.Add("Drive can read BD's Burst Cutting Area");
|
||||
if(ftr.CanReadCD) mmcOneValue.Add("Drive can read CD-ROM");
|
||||
if(ftr.CanWriteCDMRW && ftr.CanReadDVDPlusMRW && ftr.CanWriteDVDPlusMRW)
|
||||
if (ftr.BufferUnderrunFreeInDVD) mmcOneValue.Add("Drive supports zero loss linking writing DVDs");
|
||||
if (ftr.BufferUnderrunFreeInSAO)
|
||||
mmcOneValue.Add("Drive supports zero loss linking in Session at Once Mode");
|
||||
if (ftr.BufferUnderrunFreeInTAO) mmcOneValue.Add("Drive supports zero loss linking in Track at Once Mode");
|
||||
if (ftr.CanAudioScan) mmcOneValue.Add("Drive supports the SCAN command");
|
||||
if (ftr.CanEject) mmcOneValue.Add("Drive can eject media");
|
||||
if (ftr.CanEraseSector) mmcOneValue.Add("Drive supports media that require erasing before writing");
|
||||
if (ftr.CanExpandBDRESpareArea)
|
||||
mmcOneValue.Add("Drive can expand the spare area on a formatted BD-RE disc");
|
||||
if (ftr.CanFormat) mmcOneValue.Add("Drive can format media into logical blocks");
|
||||
if (ftr.CanFormatBDREWithoutSpare) mmcOneValue.Add("Drive can format BD-RE with no spares allocated");
|
||||
if (ftr.CanFormatQCert) mmcOneValue.Add("Drive can format BD-RE discs with quick certification");
|
||||
if (ftr.CanFormatCert) mmcOneValue.Add("Drive can format BD-RE discs with full certification");
|
||||
if (ftr.CanFormatFRF) mmcOneValue.Add("Drive can fast re-format BD-RE discs");
|
||||
if (ftr.CanFormatRRM) mmcOneValue.Add("Drive can format BD-R discs with RRM format");
|
||||
if (ftr.CanLoad) mmcOneValue.Add("Drive can load media");
|
||||
if (ftr.CanMuteSeparateChannels) mmcOneValue.Add("Drive is able to mute channels separately");
|
||||
if (ftr.CanOverwriteSAOTrack) mmcOneValue.Add("Drive can overwrite a SAO track with another in CD-RWs");
|
||||
if (ftr.CanOverwriteTAOTrack) mmcOneValue.Add("Drive can overwrite a TAO track with another in CD-RWs");
|
||||
if (ftr.CanPlayCDAudio) mmcOneValue.Add("Drive has an analogue audio output");
|
||||
if (ftr.CanPseudoOverwriteBDR) mmcOneValue.Add("Drive can write BD-R on Pseudo-OVerwrite SRM mode");
|
||||
if (ftr.CanReadAllDualR) mmcOneValue.Add("Drive can read DVD-R DL from all recording modes");
|
||||
if (ftr.CanReadAllDualRW) mmcOneValue.Add("Drive can read DVD-RW DL from all recording modes");
|
||||
if (ftr.CanReadBD) mmcOneValue.Add("Drive can read BD-ROM");
|
||||
if (ftr.CanReadBDR) mmcOneValue.Add("Drive can read BD-R Ver.1");
|
||||
if (ftr.CanReadBDRE1) mmcOneValue.Add("Drive can read BD-RE Ver.1");
|
||||
if (ftr.CanReadBDRE2) mmcOneValue.Add("Drive can read BD-RE Ver.2");
|
||||
if (ftr.CanReadBDROM) mmcOneValue.Add("Drive can read BD-ROM Ver.1");
|
||||
if (ftr.CanReadBluBCA) mmcOneValue.Add("Drive can read BD's Burst Cutting Area");
|
||||
if (ftr.CanReadCD) mmcOneValue.Add("Drive can read CD-ROM");
|
||||
if (ftr.CanWriteCDMRW && ftr.CanReadDVDPlusMRW && ftr.CanWriteDVDPlusMRW)
|
||||
mmcOneValue.Add("Drive can read and write CD-MRW and DVD+MRW");
|
||||
else if(ftr.CanReadDVDPlusMRW && ftr.CanWriteDVDPlusMRW)
|
||||
else if (ftr.CanReadDVDPlusMRW && ftr.CanWriteDVDPlusMRW)
|
||||
mmcOneValue.Add("Drive can read and write DVD+MRW");
|
||||
else if(ftr.CanWriteCDMRW && ftr.CanReadDVDPlusMRW)
|
||||
else if (ftr.CanWriteCDMRW && ftr.CanReadDVDPlusMRW)
|
||||
mmcOneValue.Add("Drive and read DVD+MRW and read and write CD-MRW");
|
||||
else if(ftr.CanWriteCDMRW) mmcOneValue.Add("Drive can read and write CD-MRW");
|
||||
else if(ftr.CanReadDVDPlusMRW) mmcOneValue.Add("Drive can read CD-MRW and DVD+MRW");
|
||||
else if(ftr.CanReadCDMRW) mmcOneValue.Add("Drive can read CD-MRW");
|
||||
if(ftr.CanReadCPRM_MKB) mmcOneValue.Add("Drive supports reading Media Key Block of CPRM");
|
||||
if(ftr.CanReadDDCD) mmcOneValue.Add("Drive can read DDCDs");
|
||||
if(ftr.CanReadDVD) mmcOneValue.Add("Drive can read DVD");
|
||||
if(ftr.CanWriteDVDPlusRW) mmcOneValue.Add("Drive can read and write DVD+RW");
|
||||
else if(ftr.CanReadDVDPlusRW) mmcOneValue.Add("Drive can read DVD+RW");
|
||||
if(ftr.CanWriteDVDPlusR) mmcOneValue.Add("Drive can read and write DVD+R");
|
||||
else if(ftr.CanReadDVDPlusR) mmcOneValue.Add("Drive can read DVD+R");
|
||||
if(ftr.CanWriteDVDPlusRDL) mmcOneValue.Add("Drive can read and write DVD+R DL");
|
||||
else if(ftr.CanReadDVDPlusRDL) mmcOneValue.Add("Drive can read DVD+R DL");
|
||||
if(ftr.CanReadDriveAACSCertificate) mmcOneValue.Add("Drive supports reading the Drive Certificate");
|
||||
if(ftr.CanReadHDDVD && ftr.CanReadHDDVDR && ftr.CanReadHDDVDRAM)
|
||||
else if (ftr.CanWriteCDMRW) mmcOneValue.Add("Drive can read and write CD-MRW");
|
||||
else if (ftr.CanReadDVDPlusMRW) mmcOneValue.Add("Drive can read CD-MRW and DVD+MRW");
|
||||
else if (ftr.CanReadCDMRW) mmcOneValue.Add("Drive can read CD-MRW");
|
||||
if (ftr.CanReadCPRM_MKB) mmcOneValue.Add("Drive supports reading Media Key Block of CPRM");
|
||||
if (ftr.CanReadDDCD) mmcOneValue.Add("Drive can read DDCDs");
|
||||
if (ftr.CanReadDVD) mmcOneValue.Add("Drive can read DVD");
|
||||
if (ftr.CanWriteDVDPlusRW) mmcOneValue.Add("Drive can read and write DVD+RW");
|
||||
else if (ftr.CanReadDVDPlusRW) mmcOneValue.Add("Drive can read DVD+RW");
|
||||
if (ftr.CanWriteDVDPlusR) mmcOneValue.Add("Drive can read and write DVD+R");
|
||||
else if (ftr.CanReadDVDPlusR) mmcOneValue.Add("Drive can read DVD+R");
|
||||
if (ftr.CanWriteDVDPlusRDL) mmcOneValue.Add("Drive can read and write DVD+R DL");
|
||||
else if (ftr.CanReadDVDPlusRDL) mmcOneValue.Add("Drive can read DVD+R DL");
|
||||
if (ftr.CanReadDriveAACSCertificate) mmcOneValue.Add("Drive supports reading the Drive Certificate");
|
||||
if (ftr.CanReadHDDVD && ftr.CanReadHDDVDR && ftr.CanReadHDDVDRAM)
|
||||
mmcOneValue.Add("Drive can read HD DVD-ROM, HD DVD-RW, HD DVD-R and HD DVD-RAM");
|
||||
else if(ftr.CanReadHDDVD && ftr.CanReadHDDVDR)
|
||||
else if (ftr.CanReadHDDVD && ftr.CanReadHDDVDR)
|
||||
mmcOneValue.Add("Drive can read HD DVD-ROM, HD DVD-RW and HD DVD-R");
|
||||
else if(ftr.CanReadHDDVD && ftr.CanReadHDDVDRAM)
|
||||
else if (ftr.CanReadHDDVD && ftr.CanReadHDDVDRAM)
|
||||
mmcOneValue.Add("Drive can read HD DVD-ROM, HD DVD-RW and HD DVD-RAM");
|
||||
else if(ftr.CanReadHDDVD) mmcOneValue.Add("Drive can read HD DVD-ROM and HD DVD-RW");
|
||||
if(ftr.CanReadLeadInCDText) mmcOneValue.Add("Drive can return CD-Text from Lead-In");
|
||||
if(ftr.CanReadOldBDR) mmcOneValue.Add("Drive can read BD-R pre-1.0");
|
||||
if(ftr.CanReadOldBDRE) mmcOneValue.Add("Drive can read BD-RE pre-1.0");
|
||||
if(ftr.CanReadOldBDROM) mmcOneValue.Add("Drive can read BD-ROM pre-1.0");
|
||||
if(ftr.CanReadSpareAreaInformation) mmcOneValue.Add("Drive can return Spare Area Information");
|
||||
if(ftr.CanReportDriveSerial) mmcOneValue.Add("Drive is to report drive serial number");
|
||||
if(ftr.CanReportMediaSerial) mmcOneValue.Add("Drive is to read media serial number");
|
||||
if(ftr.CanTestWriteDDCDR) mmcOneValue.Add("Drive can do a test writing with DDCD-R");
|
||||
if(ftr.CanTestWriteDVD) mmcOneValue.Add("Drive can do a test writing with DVDs");
|
||||
if(ftr.CanTestWriteInSAO) mmcOneValue.Add("Drive can do a test writing in Session at Once Mode");
|
||||
if(ftr.CanTestWriteInTAO) mmcOneValue.Add("Drive can do a test writing in Track at Once Mode");
|
||||
if(ftr.CanUpgradeFirmware) mmcOneValue.Add("Drive supports Microcode Upgrade");
|
||||
if(ftr.ErrorRecoveryPage) mmcOneValue.Add("Drive shall report Read/Write Error Recovery mode page");
|
||||
if(ftr.Locked) mmcOneValue.Add("Drive can lock media");
|
||||
if(ftr.LogicalBlockSize > 0) mmcOneValue.Add($"{ftr.LogicalBlockSize} bytes per logical block");
|
||||
if(ftr.MultiRead)
|
||||
mmcOneValue.Add("Drive claims capability to read all CD formats according to OSTA Multi-Read Specification");
|
||||
else if (ftr.CanReadHDDVD) mmcOneValue.Add("Drive can read HD DVD-ROM and HD DVD-RW");
|
||||
if (ftr.CanReadLeadInCDText) mmcOneValue.Add("Drive can return CD-Text from Lead-In");
|
||||
if (ftr.CanReadOldBDR) mmcOneValue.Add("Drive can read BD-R pre-1.0");
|
||||
if (ftr.CanReadOldBDRE) mmcOneValue.Add("Drive can read BD-RE pre-1.0");
|
||||
if (ftr.CanReadOldBDROM) mmcOneValue.Add("Drive can read BD-ROM pre-1.0");
|
||||
if (ftr.CanReadSpareAreaInformation) mmcOneValue.Add("Drive can return Spare Area Information");
|
||||
if (ftr.CanReportDriveSerial) mmcOneValue.Add("Drive is to report drive serial number");
|
||||
if (ftr.CanReportMediaSerial) mmcOneValue.Add("Drive is to read media serial number");
|
||||
if (ftr.CanTestWriteDDCDR) mmcOneValue.Add("Drive can do a test writing with DDCD-R");
|
||||
if (ftr.CanTestWriteDVD) mmcOneValue.Add("Drive can do a test writing with DVDs");
|
||||
if (ftr.CanTestWriteInSAO) mmcOneValue.Add("Drive can do a test writing in Session at Once Mode");
|
||||
if (ftr.CanTestWriteInTAO) mmcOneValue.Add("Drive can do a test writing in Track at Once Mode");
|
||||
if (ftr.CanUpgradeFirmware) mmcOneValue.Add("Drive supports Microcode Upgrade");
|
||||
if (ftr.ErrorRecoveryPage) mmcOneValue.Add("Drive shall report Read/Write Error Recovery mode page");
|
||||
if (ftr.Locked) mmcOneValue.Add("Drive can lock media");
|
||||
if (ftr.LogicalBlockSize > 0) mmcOneValue.Add($"{ftr.LogicalBlockSize} bytes per logical block");
|
||||
if (ftr.MultiRead)
|
||||
mmcOneValue.Add(
|
||||
"Drive claims capability to read all CD formats according to OSTA Multi-Read Specification");
|
||||
|
||||
if(ftr.PhysicalInterfaceStandard.HasValue)
|
||||
switch(ftr.PhysicalInterfaceStandard)
|
||||
if (ftr.PhysicalInterfaceStandard.HasValue)
|
||||
switch (ftr.PhysicalInterfaceStandard)
|
||||
{
|
||||
case PhysicalInterfaces.Unspecified:
|
||||
mmcOneValue.Add("Drive uses an unspecified physical interface");
|
||||
@@ -166,86 +169,86 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
default:
|
||||
mmcOneValue
|
||||
.Add($"Drive uses an unknown interface with code {(uint)ftr.PhysicalInterfaceStandard}");
|
||||
.Add($"Drive uses an unknown interface with code {(uint) ftr.PhysicalInterfaceStandard}");
|
||||
break;
|
||||
}
|
||||
|
||||
if(ftr.PreventJumper) mmcOneValue.Add("Drive power ups locked");
|
||||
if(ftr.SupportsBusEncryption) mmcOneValue.Add("Drive supports bus encryption");
|
||||
if(ftr.CanWriteBD) mmcOneValue.Add("Drive can write BD-R or BD-RE");
|
||||
if(ftr.CanWriteBDR) mmcOneValue.Add("Drive can write BD-R Ver.1");
|
||||
if(ftr.CanWriteBDRE1) mmcOneValue.Add("Drive can write BD-RE Ver.1");
|
||||
if(ftr.CanWriteBDRE2) mmcOneValue.Add("Drive can write BD-RE Ver.2");
|
||||
if(ftr.CanWriteBusEncryptedBlocks) mmcOneValue.Add("Drive supports writing with bus encryption");
|
||||
if(ftr.CanWriteCDRW) mmcOneValue.Add("Drive can write CD-RW");
|
||||
if(ftr.CanWriteCDRWCAV) mmcOneValue.Add("Drive can write High-Speed CD-RW");
|
||||
if(ftr.CanWriteCDSAO && !ftr.CanWriteRaw)
|
||||
if (ftr.PreventJumper) mmcOneValue.Add("Drive power ups locked");
|
||||
if (ftr.SupportsBusEncryption) mmcOneValue.Add("Drive supports bus encryption");
|
||||
if (ftr.CanWriteBD) mmcOneValue.Add("Drive can write BD-R or BD-RE");
|
||||
if (ftr.CanWriteBDR) mmcOneValue.Add("Drive can write BD-R Ver.1");
|
||||
if (ftr.CanWriteBDRE1) mmcOneValue.Add("Drive can write BD-RE Ver.1");
|
||||
if (ftr.CanWriteBDRE2) mmcOneValue.Add("Drive can write BD-RE Ver.2");
|
||||
if (ftr.CanWriteBusEncryptedBlocks) mmcOneValue.Add("Drive supports writing with bus encryption");
|
||||
if (ftr.CanWriteCDRW) mmcOneValue.Add("Drive can write CD-RW");
|
||||
if (ftr.CanWriteCDRWCAV) mmcOneValue.Add("Drive can write High-Speed CD-RW");
|
||||
if (ftr.CanWriteCDSAO && !ftr.CanWriteRaw)
|
||||
mmcOneValue.Add("Drive can write CDs in Session at Once Mode:");
|
||||
else if(!ftr.CanWriteCDSAO && ftr.CanWriteRaw) mmcOneValue.Add("Drive can write CDs in raw Mode:");
|
||||
else if(ftr.CanWriteCDSAO && ftr.CanWriteRaw)
|
||||
else if (!ftr.CanWriteCDSAO && ftr.CanWriteRaw) mmcOneValue.Add("Drive can write CDs in raw Mode:");
|
||||
else if (ftr.CanWriteCDSAO && ftr.CanWriteRaw)
|
||||
mmcOneValue.Add("Drive can write CDs in Session at Once and in Raw Modes:");
|
||||
if(ftr.CanWriteCDTAO) mmcOneValue.Add("Drive can write CDs in Track at Once Mode:");
|
||||
if(ftr.CanWriteCSSManagedDVD) mmcOneValue.Add("Drive can write CSS managed DVDs");
|
||||
if(ftr.CanWriteDDCDR) mmcOneValue.Add("Drive supports writing DDCD-R");
|
||||
if(ftr.CanWriteDDCDRW) mmcOneValue.Add("Drive supports writing DDCD-RW");
|
||||
if(ftr.CanWriteDVDPlusRWDL) mmcOneValue.Add("Drive can read and write DVD+RW DL");
|
||||
else if(ftr.CanReadDVDPlusRWDL) mmcOneValue.Add("Drive can read DVD+RW DL");
|
||||
if(ftr.CanWriteDVDR && ftr.CanWriteDVDRW && ftr.CanWriteDVDRDL)
|
||||
if (ftr.CanWriteCDTAO) mmcOneValue.Add("Drive can write CDs in Track at Once Mode:");
|
||||
if (ftr.CanWriteCSSManagedDVD) mmcOneValue.Add("Drive can write CSS managed DVDs");
|
||||
if (ftr.CanWriteDDCDR) mmcOneValue.Add("Drive supports writing DDCD-R");
|
||||
if (ftr.CanWriteDDCDRW) mmcOneValue.Add("Drive supports writing DDCD-RW");
|
||||
if (ftr.CanWriteDVDPlusRWDL) mmcOneValue.Add("Drive can read and write DVD+RW DL");
|
||||
else if (ftr.CanReadDVDPlusRWDL) mmcOneValue.Add("Drive can read DVD+RW DL");
|
||||
if (ftr.CanWriteDVDR && ftr.CanWriteDVDRW && ftr.CanWriteDVDRDL)
|
||||
mmcOneValue.Add("Drive supports writing DVD-R, DVD-RW and DVD-R DL");
|
||||
else if(ftr.CanWriteDVDR && ftr.CanWriteDVDRDL)
|
||||
else if (ftr.CanWriteDVDR && ftr.CanWriteDVDRDL)
|
||||
mmcOneValue.Add("Drive supports writing DVD-R and DVD-R DL");
|
||||
else if(ftr.CanWriteDVDR && ftr.CanWriteDVDRW) mmcOneValue.Add("Drive supports writing DVD-R and DVD-RW");
|
||||
else if(ftr.CanWriteDVDR) mmcOneValue.Add("Drive supports writing DVD-R");
|
||||
if(ftr.CanWriteHDDVDR && ftr.CanWriteHDDVDRAM)
|
||||
else if (ftr.CanWriteDVDR && ftr.CanWriteDVDRW) mmcOneValue.Add("Drive supports writing DVD-R and DVD-RW");
|
||||
else if (ftr.CanWriteDVDR) mmcOneValue.Add("Drive supports writing DVD-R");
|
||||
if (ftr.CanWriteHDDVDR && ftr.CanWriteHDDVDRAM)
|
||||
mmcOneValue.Add("Drive can write HD DVD-RW, HD DVD-R and HD DVD-RAM");
|
||||
else if(ftr.CanWriteHDDVDR) mmcOneValue.Add("Drive can write HD DVD-RW and HD DVD-R");
|
||||
else if(ftr.CanWriteHDDVDRAM) mmcOneValue.Add("Drive can write HD DVD-RW and HD DVD-RAM");
|
||||
else if (ftr.CanWriteHDDVDR) mmcOneValue.Add("Drive can write HD DVD-RW and HD DVD-R");
|
||||
else if (ftr.CanWriteHDDVDRAM) mmcOneValue.Add("Drive can write HD DVD-RW and HD DVD-RAM");
|
||||
// TODO: Write HD DVD-RW
|
||||
/*
|
||||
else
|
||||
mmcOneValue.Add("Drive can write HD DVD-RW");
|
||||
*/
|
||||
if(ftr.CanWriteOldBDR) mmcOneValue.Add("Drive can write BD-R pre-1.0");
|
||||
if(ftr.CanWriteOldBDRE) mmcOneValue.Add("Drive can write BD-RE pre-1.0");
|
||||
if(ftr.CanWriteRWSubchannelInTAO)
|
||||
if (ftr.CanWriteOldBDR) mmcOneValue.Add("Drive can write BD-R pre-1.0");
|
||||
if (ftr.CanWriteOldBDRE) mmcOneValue.Add("Drive can write BD-RE pre-1.0");
|
||||
if (ftr.CanWriteRWSubchannelInTAO)
|
||||
{
|
||||
mmcOneValue.Add("Drive can write user provided data in the R-W subchannels in Track at Once Mode");
|
||||
if(ftr.CanWriteRawSubchannelInTAO)
|
||||
if (ftr.CanWriteRawSubchannelInTAO)
|
||||
mmcOneValue.Add("Drive accepts RAW R-W subchannel data in Track at Once Mode");
|
||||
if(ftr.CanWritePackedSubchannelInTAO)
|
||||
if (ftr.CanWritePackedSubchannelInTAO)
|
||||
mmcOneValue.Add("Drive accepts Packed R-W subchannel data in Track at Once Mode");
|
||||
}
|
||||
|
||||
if(ftr.CanWriteRWSubchannelInSAO)
|
||||
if (ftr.CanWriteRWSubchannelInSAO)
|
||||
mmcOneValue.Add("Drive can write user provided data in the R-W subchannels in Session at Once Mode");
|
||||
if(ftr.CanWriteRaw && ftr.CanWriteRawMultiSession)
|
||||
if (ftr.CanWriteRaw && ftr.CanWriteRawMultiSession)
|
||||
mmcOneValue.Add("Drive can write multi-session CDs in raw mode");
|
||||
if(ftr.EmbeddedChanger)
|
||||
if (ftr.EmbeddedChanger)
|
||||
{
|
||||
mmcOneValue.Add("Drive contains an embedded changer");
|
||||
|
||||
if(ftr.ChangerIsSideChangeCapable) mmcOneValue.Add("Drive can change disc side");
|
||||
if(ftr.ChangerSupportsDiscPresent)
|
||||
if (ftr.ChangerIsSideChangeCapable) mmcOneValue.Add("Drive can change disc side");
|
||||
if (ftr.ChangerSupportsDiscPresent)
|
||||
mmcOneValue.Add("Drive is able to report slots contents after a reset or change");
|
||||
|
||||
mmcOneValue.Add($"Drive has {ftr.ChangerSlots + 1} slots");
|
||||
}
|
||||
|
||||
if(ftr.SupportsCSS && ftr.CSSVersion.HasValue)
|
||||
if (ftr.SupportsCSS && ftr.CSSVersion.HasValue)
|
||||
mmcOneValue.Add($"Drive supports DVD CSS/CPPM version {ftr.CSSVersion}");
|
||||
else if(ftr.SupportsCSS) mmcOneValue.Add("Drive supports DVD CSS/CPRM");
|
||||
if(ftr.SupportsCPRM && ftr.CPRMVersion.HasValue)
|
||||
else if (ftr.SupportsCSS) mmcOneValue.Add("Drive supports DVD CSS/CPRM");
|
||||
if (ftr.SupportsCPRM && ftr.CPRMVersion.HasValue)
|
||||
mmcOneValue.Add($"Drive supports DVD CPPM version {ftr.CPRMVersion}");
|
||||
else if(ftr.SupportsCPRM) mmcOneValue.Add("Drive supports DVD CPRM");
|
||||
if(ftr.DBML) mmcOneValue.Add("Drive reports Device Busy Class events during medium loading/unloading");
|
||||
if(ftr.DVDMultiRead) mmcOneValue.Add("Drive conforms to DVD Multi Drive Read-only Specifications");
|
||||
if(ftr.FirmwareDate.HasValue) mmcOneValue.Add($"Drive firmware is dated {ftr.FirmwareDate}");
|
||||
if(ftr.SupportsC2) mmcOneValue.Add("Drive supports C2 Error Pointers");
|
||||
if(ftr.SupportsDAP) mmcOneValue.Add("Drive supports the DAP bit in the READ CD and READ CD MSF commands");
|
||||
if(ftr.SupportsDeviceBusyEvent) mmcOneValue.Add("Drive supports Device Busy events");
|
||||
else if (ftr.SupportsCPRM) mmcOneValue.Add("Drive supports DVD CPRM");
|
||||
if (ftr.DBML) mmcOneValue.Add("Drive reports Device Busy Class events during medium loading/unloading");
|
||||
if (ftr.DVDMultiRead) mmcOneValue.Add("Drive conforms to DVD Multi Drive Read-only Specifications");
|
||||
if (ftr.FirmwareDate.HasValue) mmcOneValue.Add($"Drive firmware is dated {ftr.FirmwareDate}");
|
||||
if (ftr.SupportsC2) mmcOneValue.Add("Drive supports C2 Error Pointers");
|
||||
if (ftr.SupportsDAP) mmcOneValue.Add("Drive supports the DAP bit in the READ CD and READ CD MSF commands");
|
||||
if (ftr.SupportsDeviceBusyEvent) mmcOneValue.Add("Drive supports Device Busy events");
|
||||
|
||||
if(ftr.LoadingMechanismType.HasValue)
|
||||
switch(ftr.LoadingMechanismType)
|
||||
if (ftr.LoadingMechanismType.HasValue)
|
||||
switch (ftr.LoadingMechanismType)
|
||||
{
|
||||
case 0:
|
||||
mmcOneValue.Add("Drive uses media caddy");
|
||||
@@ -267,20 +270,20 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
if(ftr.SupportsHybridDiscs) mmcOneValue.Add("Drive is able to access Hybrid discs");
|
||||
if(ftr.SupportsModePage1Ch)
|
||||
if (ftr.SupportsHybridDiscs) mmcOneValue.Add("Drive is able to access Hybrid discs");
|
||||
if (ftr.SupportsModePage1Ch)
|
||||
mmcOneValue.Add("Drive supports the Informational Exceptions Control mode page 1Ch");
|
||||
if(ftr.SupportsOSSC)
|
||||
if (ftr.SupportsOSSC)
|
||||
mmcOneValue.Add("Drive supports the Trusted Computing Group Optical Security Subsystem Class");
|
||||
if(ftr.SupportsPWP) mmcOneValue.Add("Drive supports set/release of PWP status");
|
||||
if(ftr.SupportsSWPP) mmcOneValue.Add("Drive supports the SWPP bit of the Timeout and Protect mode page");
|
||||
if(ftr.SupportsSecurDisc) mmcOneValue.Add("Drive supports SecurDisc");
|
||||
if(ftr.SupportsSeparateVolume) mmcOneValue.Add("Drive supports separate volume per channel");
|
||||
if(ftr.SupportsVCPS) mmcOneValue.Add("Drive supports VCPS");
|
||||
if(ftr.VolumeLevels.HasValue) mmcOneValue.Add($"Drive has {ftr.VolumeLevels + 1} volume levels");
|
||||
if(ftr.SupportsWriteProtectPAC)
|
||||
if (ftr.SupportsPWP) mmcOneValue.Add("Drive supports set/release of PWP status");
|
||||
if (ftr.SupportsSWPP) mmcOneValue.Add("Drive supports the SWPP bit of the Timeout and Protect mode page");
|
||||
if (ftr.SupportsSecurDisc) mmcOneValue.Add("Drive supports SecurDisc");
|
||||
if (ftr.SupportsSeparateVolume) mmcOneValue.Add("Drive supports separate volume per channel");
|
||||
if (ftr.SupportsVCPS) mmcOneValue.Add("Drive supports VCPS");
|
||||
if (ftr.VolumeLevels.HasValue) mmcOneValue.Add($"Drive has {ftr.VolumeLevels + 1} volume levels");
|
||||
if (ftr.SupportsWriteProtectPAC)
|
||||
mmcOneValue.Add("Drive supports reading/writing the Disc Write Protect PAC on BD-R/-RE media");
|
||||
if(ftr.SupportsWriteInhibitDCB)
|
||||
if (ftr.SupportsWriteInhibitDCB)
|
||||
mmcOneValue.Add("Drive supports writing the Write Inhibit DCB on DVD+RW media");
|
||||
|
||||
mmcOneValue.Sort();
|
||||
|
||||
@@ -46,20 +46,20 @@ namespace DiscImageChef.Server
|
||||
/// <param name="mmcOneValue">List to put the values on</param>
|
||||
public static void Report(Modes.ModePage_2A mode, ref List<string> mmcOneValue)
|
||||
{
|
||||
if(mode.AudioPlay) mmcOneValue.Add("Drive can play audio");
|
||||
if(mode.Mode2Form1) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 1 format");
|
||||
if(mode.Mode2Form2) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 2 format");
|
||||
if(mode.MultiSession) mmcOneValue.Add("Drive supports multi-session discs and/or Photo-CD");
|
||||
if (mode.AudioPlay) mmcOneValue.Add("Drive can play audio");
|
||||
if (mode.Mode2Form1) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 1 format");
|
||||
if (mode.Mode2Form2) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 2 format");
|
||||
if (mode.MultiSession) mmcOneValue.Add("Drive supports multi-session discs and/or Photo-CD");
|
||||
|
||||
if(mode.CDDACommand) mmcOneValue.Add("Drive can read digital audio");
|
||||
if(mode.AccurateCDDA) mmcOneValue.Add("Drive can continue from streaming loss");
|
||||
if(mode.Subchannel) mmcOneValue.Add("Drive can read uncorrected and interleaved R-W subchannels");
|
||||
if(mode.DeinterlaveSubchannel) mmcOneValue.Add("Drive can read, deinterleave and correct R-W subchannels");
|
||||
if(mode.C2Pointer) mmcOneValue.Add("Drive supports C2 pointers");
|
||||
if(mode.UPC) mmcOneValue.Add("Drive can read Media Catalogue Number");
|
||||
if(mode.ISRC) mmcOneValue.Add("Drive can read ISRC");
|
||||
if (mode.CDDACommand) mmcOneValue.Add("Drive can read digital audio");
|
||||
if (mode.AccurateCDDA) mmcOneValue.Add("Drive can continue from streaming loss");
|
||||
if (mode.Subchannel) mmcOneValue.Add("Drive can read uncorrected and interleaved R-W subchannels");
|
||||
if (mode.DeinterlaveSubchannel) mmcOneValue.Add("Drive can read, deinterleave and correct R-W subchannels");
|
||||
if (mode.C2Pointer) mmcOneValue.Add("Drive supports C2 pointers");
|
||||
if (mode.UPC) mmcOneValue.Add("Drive can read Media Catalogue Number");
|
||||
if (mode.ISRC) mmcOneValue.Add("Drive can read ISRC");
|
||||
|
||||
switch(mode.LoadingMechanism)
|
||||
switch (mode.LoadingMechanism)
|
||||
{
|
||||
case 0:
|
||||
mmcOneValue.Add("Drive uses media caddy");
|
||||
@@ -81,89 +81,93 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
if(mode.Lock) mmcOneValue.Add("Drive can lock media");
|
||||
if(mode.PreventJumper)
|
||||
if (mode.Lock) mmcOneValue.Add("Drive can lock media");
|
||||
if (mode.PreventJumper)
|
||||
{
|
||||
mmcOneValue.Add("Drive power ups locked");
|
||||
mmcOneValue.Add(mode.LockState
|
||||
? "Drive is locked, media cannot be ejected or inserted"
|
||||
: "Drive is not locked, media can be ejected and inserted");
|
||||
? "Drive is locked, media cannot be ejected or inserted"
|
||||
: "Drive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
else
|
||||
{
|
||||
mmcOneValue.Add(mode.LockState
|
||||
? "Drive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||
: "Drive is not locked, media can be ejected and inserted");
|
||||
? "Drive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||
: "Drive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
|
||||
if(mode.Eject) mmcOneValue.Add("Drive can eject media");
|
||||
if (mode.Eject) mmcOneValue.Add("Drive can eject media");
|
||||
|
||||
if(mode.SeparateChannelMute) mmcOneValue.Add("Each channel can be muted independently");
|
||||
if(mode.SeparateChannelVolume) mmcOneValue.Add("Each channel's volume can be controlled independently");
|
||||
if (mode.SeparateChannelMute) mmcOneValue.Add("Each channel can be muted independently");
|
||||
if (mode.SeparateChannelVolume) mmcOneValue.Add("Each channel's volume can be controlled independently");
|
||||
|
||||
if(mode.SupportedVolumeLevels > 0)
|
||||
if (mode.SupportedVolumeLevels > 0)
|
||||
mmcOneValue.Add($"Drive supports {mode.SupportedVolumeLevels} volume levels");
|
||||
if(mode.BufferSize > 0) mmcOneValue.Add($"Drive has {mode.BufferSize} Kbyte of buffer");
|
||||
if(mode.MaximumSpeed > 0)
|
||||
if (mode.BufferSize > 0) mmcOneValue.Add($"Drive has {mode.BufferSize} Kbyte of buffer");
|
||||
if (mode.MaximumSpeed > 0)
|
||||
mmcOneValue.Add($"Drive's maximum reading speed is {mode.MaximumSpeed} Kbyte/sec.");
|
||||
if(mode.CurrentSpeed > 0)
|
||||
if (mode.CurrentSpeed > 0)
|
||||
mmcOneValue.Add($"Drive's current reading speed is {mode.CurrentSpeed} Kbyte/sec.");
|
||||
|
||||
if(mode.ReadCDR)
|
||||
if (mode.ReadCDR)
|
||||
{
|
||||
mmcOneValue.Add(mode.WriteCDR ? "Drive can read and write CD-R" : "Drive can read CD-R");
|
||||
|
||||
if(mode.Method2) mmcOneValue.Add("Drive supports reading CD-R packet media");
|
||||
if (mode.Method2) mmcOneValue.Add("Drive supports reading CD-R packet media");
|
||||
}
|
||||
|
||||
if(mode.ReadCDRW)
|
||||
if (mode.ReadCDRW)
|
||||
mmcOneValue.Add(mode.WriteCDRW ? "Drive can read and write CD-RW" : "Drive can read CD-RW");
|
||||
|
||||
if(mode.ReadDVDROM) mmcOneValue.Add("Drive can read DVD-ROM");
|
||||
if(mode.ReadDVDR)
|
||||
if (mode.ReadDVDROM) mmcOneValue.Add("Drive can read DVD-ROM");
|
||||
if (mode.ReadDVDR)
|
||||
mmcOneValue.Add(mode.WriteDVDR ? "Drive can read and write DVD-R" : "Drive can read DVD-R");
|
||||
if(mode.ReadDVDRAM)
|
||||
if (mode.ReadDVDRAM)
|
||||
mmcOneValue.Add(mode.WriteDVDRAM ? "Drive can read and write DVD-RAM" : "Drive can read DVD-RAM");
|
||||
|
||||
if(mode.Composite) mmcOneValue.Add("Drive can deliver a composite audio and video data stream");
|
||||
if(mode.DigitalPort1) mmcOneValue.Add("Drive supports IEC-958 digital output on port 1");
|
||||
if(mode.DigitalPort2) mmcOneValue.Add("Drive supports IEC-958 digital output on port 2");
|
||||
if (mode.Composite) mmcOneValue.Add("Drive can deliver a composite audio and video data stream");
|
||||
if (mode.DigitalPort1) mmcOneValue.Add("Drive supports IEC-958 digital output on port 1");
|
||||
if (mode.DigitalPort2) mmcOneValue.Add("Drive supports IEC-958 digital output on port 2");
|
||||
|
||||
if(mode.SDP) mmcOneValue.Add("Drive contains a changer that can report the exact contents of the slots");
|
||||
if(mode.CurrentWriteSpeedSelected > 0)
|
||||
if (mode.SDP) mmcOneValue.Add("Drive contains a changer that can report the exact contents of the slots");
|
||||
if (mode.CurrentWriteSpeedSelected > 0)
|
||||
{
|
||||
if(mode.RotationControlSelected == 0)
|
||||
if (mode.RotationControlSelected == 0)
|
||||
mmcOneValue
|
||||
.Add($"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in CLV mode");
|
||||
else if(mode.RotationControlSelected == 1)
|
||||
.Add(
|
||||
$"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in CLV mode");
|
||||
else if (mode.RotationControlSelected == 1)
|
||||
mmcOneValue
|
||||
.Add($"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in pure CAV mode");
|
||||
.Add(
|
||||
$"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in pure CAV mode");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mode.MaxWriteSpeed > 0)
|
||||
if (mode.MaxWriteSpeed > 0)
|
||||
mmcOneValue.Add($"Drive's maximum writing speed is {mode.MaxWriteSpeed} Kbyte/sec.");
|
||||
if(mode.CurrentWriteSpeed > 0)
|
||||
if (mode.CurrentWriteSpeed > 0)
|
||||
mmcOneValue.Add($"Drive's current writing speed is {mode.CurrentWriteSpeed} Kbyte/sec.");
|
||||
}
|
||||
|
||||
if(mode.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach(Modes.ModePage_2A_WriteDescriptor descriptor in
|
||||
if (mode.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach (var descriptor in
|
||||
mode.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
|
||||
if(descriptor.RotationControl == 0)
|
||||
if (descriptor.RotationControl == 0)
|
||||
mmcOneValue.Add($"Drive supports writing at {descriptor.WriteSpeed} Kbyte/sec. in CLV mode");
|
||||
else if(descriptor.RotationControl == 1)
|
||||
else if (descriptor.RotationControl == 1)
|
||||
mmcOneValue
|
||||
.Add($"Drive supports writing at is {descriptor.WriteSpeed} Kbyte/sec. in pure CAV mode");
|
||||
.Add($"Drive supports writing at is {descriptor.WriteSpeed} Kbyte/sec. in pure CAV mode");
|
||||
|
||||
if(mode.TestWrite) mmcOneValue.Add("Drive supports test writing");
|
||||
if (mode.TestWrite) mmcOneValue.Add("Drive supports test writing");
|
||||
|
||||
if(mode.ReadBarcode) mmcOneValue.Add("Drive can read barcode");
|
||||
if (mode.ReadBarcode) mmcOneValue.Add("Drive can read barcode");
|
||||
|
||||
if(mode.SCC) mmcOneValue.Add("Drive can read both sides of a disc");
|
||||
if(mode.LeadInPW) mmcOneValue.Add("Drive an read raw R-W subchannel from the Lead-In");
|
||||
if (mode.SCC) mmcOneValue.Add("Drive can read both sides of a disc");
|
||||
if (mode.LeadInPW) mmcOneValue.Add("Drive an read raw R-W subchannel from the Lead-In");
|
||||
|
||||
if(mode.CMRSupported == 1) mmcOneValue.Add("Drive supports DVD CSS and/or DVD CPPM");
|
||||
if (mode.CMRSupported == 1) mmcOneValue.Add("Drive supports DVD CSS and/or DVD CPPM");
|
||||
|
||||
if(mode.BUF) mmcOneValue.Add("Drive supports buffer under-run free recording");
|
||||
if (mode.BUF) mmcOneValue.Add("Drive supports buffer under-run free recording");
|
||||
|
||||
mmcOneValue.Sort();
|
||||
mmcOneValue.Add("");
|
||||
|
||||
@@ -47,24 +47,25 @@ namespace DiscImageChef.Server
|
||||
/// <param name="deviceType">SCSI peripheral device type</param>
|
||||
/// <param name="scsiOneValue">List to put values on</param>
|
||||
/// <param name="modePages">List to put key=value pairs on</param>
|
||||
public static void Report(ScsiMode modeSense, string vendor,
|
||||
PeripheralDeviceTypes deviceType,
|
||||
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
||||
public static void Report(ScsiMode modeSense, string vendor,
|
||||
PeripheralDeviceTypes deviceType,
|
||||
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
||||
{
|
||||
if(modeSense.MediumType.HasValue) scsiOneValue.Add($"Medium type is {modeSense.MediumType:X2}h");
|
||||
if(modeSense.WriteProtected) scsiOneValue.Add("Device is write protected.");
|
||||
if(modeSense.BlockDescriptors != null)
|
||||
foreach(BlockDescriptor descriptor in modeSense.BlockDescriptors)
|
||||
if(descriptor.Blocks.HasValue && descriptor.BlockLength.HasValue)
|
||||
if (modeSense.MediumType.HasValue) scsiOneValue.Add($"Medium type is {modeSense.MediumType:X2}h");
|
||||
if (modeSense.WriteProtected) scsiOneValue.Add("Device is write protected.");
|
||||
if (modeSense.BlockDescriptors != null)
|
||||
foreach (var descriptor in modeSense.BlockDescriptors)
|
||||
if (descriptor.Blocks.HasValue && descriptor.BlockLength.HasValue)
|
||||
scsiOneValue
|
||||
.Add($"Density code {descriptor.Density:X2}h has {descriptor.Blocks} blocks of {descriptor.BlockLength} bytes each");
|
||||
.Add(
|
||||
$"Density code {descriptor.Density:X2}h has {descriptor.Blocks} blocks of {descriptor.BlockLength} bytes each");
|
||||
else
|
||||
scsiOneValue.Add($"Density code {descriptor.Density:X2}h");
|
||||
|
||||
if(modeSense.DPOandFUA) scsiOneValue.Add("Drive supports DPO and FUA bits");
|
||||
if(modeSense.BlankCheckEnabled) scsiOneValue.Add("Blank checking during write is enabled");
|
||||
if(modeSense.BufferedMode.HasValue)
|
||||
switch(modeSense.BufferedMode)
|
||||
if (modeSense.DPOandFUA) scsiOneValue.Add("Drive supports DPO and FUA bits");
|
||||
if (modeSense.BlankCheckEnabled) scsiOneValue.Add("Blank checking during write is enabled");
|
||||
if (modeSense.BufferedMode.HasValue)
|
||||
switch (modeSense.BufferedMode)
|
||||
{
|
||||
case 0:
|
||||
scsiOneValue.Add("Device writes directly to media");
|
||||
@@ -80,35 +81,38 @@ namespace DiscImageChef.Server
|
||||
break;
|
||||
}
|
||||
|
||||
if(modeSense.ModePages == null) return;
|
||||
if (modeSense.ModePages == null) return;
|
||||
|
||||
foreach(ScsiPage page in modeSense.ModePages)
|
||||
switch(page.page)
|
||||
foreach (var page in modeSense.ModePages)
|
||||
switch (page.page)
|
||||
{
|
||||
case 0x00:
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice && page.subpage == 0)
|
||||
if (deviceType == PeripheralDeviceTypes.MultiMediaDevice && page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_00_SFF(page.value));
|
||||
else
|
||||
modePages
|
||||
.Add(page.subpage != 0 ? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h" : $"MODE page {page.page:X2}h",
|
||||
.Add(
|
||||
page.subpage != 0
|
||||
? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h"
|
||||
: $"MODE page {page.page:X2}h",
|
||||
"Unknown vendor mode page");
|
||||
break;
|
||||
}
|
||||
case 0x01:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h",
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_01_MMC(page.value)
|
||||
: Modes.PrettifyModePage_01(page.value));
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_01_MMC(page.value)
|
||||
: Modes.PrettifyModePage_01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x02:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_02(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -116,7 +120,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x03:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_03(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -124,7 +128,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x04:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_04(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -132,7 +136,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x05:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_05(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -140,7 +144,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x06:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_06(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -148,18 +152,18 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x07:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h",
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_07_MMC(page.value)
|
||||
: Modes.PrettifyModePage_07(page.value));
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_07_MMC(page.value)
|
||||
: Modes.PrettifyModePage_07(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x08:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_08(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -167,18 +171,18 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x0A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
else if (page.subpage == 1)
|
||||
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||
Modes.PrettifyModePage_0A_S01(page.value));
|
||||
Modes.PrettifyModePage_0A_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x0B:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0B(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -186,7 +190,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x0D:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0D(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -194,7 +198,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x0E:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0E(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -202,7 +206,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x0F:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0F(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -210,18 +214,18 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x10:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h",
|
||||
deviceType == PeripheralDeviceTypes.SequentialAccess
|
||||
? Modes.PrettifyModePage_10_SSC(page.value)
|
||||
: Modes.PrettifyModePage_10(page.value));
|
||||
deviceType == PeripheralDeviceTypes.SequentialAccess
|
||||
? Modes.PrettifyModePage_10_SSC(page.value)
|
||||
: Modes.PrettifyModePage_10(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x11:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_11(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -231,7 +235,7 @@ namespace DiscImageChef.Server
|
||||
case 0x13:
|
||||
case 0x14:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_12_13_14(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -239,18 +243,18 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x1A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
else if (page.subpage == 1)
|
||||
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||
Modes.PrettifyModePage_1A_S01(page.value));
|
||||
Modes.PrettifyModePage_1A_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x1B:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1B(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -258,21 +262,21 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x1C:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h",
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_1C_SFF(page.value)
|
||||
: Modes.PrettifyModePage_1C(page.value));
|
||||
else if(page.subpage == 1)
|
||||
deviceType == PeripheralDeviceTypes.MultiMediaDevice
|
||||
? Modes.PrettifyModePage_1C_SFF(page.value)
|
||||
: Modes.PrettifyModePage_1C(page.value));
|
||||
else if (page.subpage == 1)
|
||||
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||
Modes.PrettifyModePage_1C_S01(page.value));
|
||||
Modes.PrettifyModePage_1C_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x1D:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1D(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -280,7 +284,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x21:
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
if (vendor == "CERTANCE")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyCertanceModePage_21(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -288,7 +292,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x22:
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
if (vendor == "CERTANCE")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyCertanceModePage_22(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -296,7 +300,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x24:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
if (vendor == "IBM")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyIBMModePage_24(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -304,7 +308,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x2A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if (page.subpage == 0)
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_2A(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -312,7 +316,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x2F:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
if (vendor == "IBM")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyIBMModePage_2F(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -320,7 +324,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x30:
|
||||
{
|
||||
if(Modes.IsAppleModePage_30(page.value))
|
||||
if (Modes.IsAppleModePage_30(page.value))
|
||||
modePages.Add("MODE page 30h", "Drive identifies as an Apple OEM drive");
|
||||
else goto default;
|
||||
|
||||
@@ -328,7 +332,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x3B:
|
||||
{
|
||||
if(vendor == "HP")
|
||||
if (vendor == "HP")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyHPModePage_3B(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -336,7 +340,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x3C:
|
||||
{
|
||||
if(vendor == "HP")
|
||||
if (vendor == "HP")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyHPModePage_3C(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -344,9 +348,9 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x3D:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
if (vendor == "IBM")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyIBMModePage_3D(page.value));
|
||||
else if(vendor == "HP")
|
||||
else if (vendor == "HP")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyHPModePage_3D(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -354,9 +358,9 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
case 0x3E:
|
||||
{
|
||||
if(vendor == "FUJITSU")
|
||||
if (vendor == "FUJITSU")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyFujitsuModePage_3E(page.value));
|
||||
else if(vendor == "HP")
|
||||
else if (vendor == "HP")
|
||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyHPModePage_3E(page.value));
|
||||
else goto default;
|
||||
|
||||
@@ -364,16 +368,19 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
default:
|
||||
{
|
||||
modePages.Add(page.subpage != 0 ? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h" : $"MODE page {page.page:X2}h",
|
||||
"Unknown mode page");
|
||||
modePages.Add(
|
||||
page.subpage != 0
|
||||
? $"MODE page {page.page:X2}h subpage {page.subpage:X2}h"
|
||||
: $"MODE page {page.page:X2}h",
|
||||
"Unknown mode page");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Dictionary<string, string> newModePages = new Dictionary<string, string>();
|
||||
foreach(KeyValuePair<string, string> kvp in modePages)
|
||||
var newModePages = new Dictionary<string, string>();
|
||||
foreach (var kvp in modePages)
|
||||
newModePages.Add(kvp.Key,
|
||||
string.IsNullOrWhiteSpace(kvp.Value) ? "Undecoded" : kvp.Value.Replace("\n", "<br/>"));
|
||||
string.IsNullOrWhiteSpace(kvp.Value) ? "Undecoded" : kvp.Value.Replace("\n", "<br/>"));
|
||||
|
||||
modePages = newModePages;
|
||||
}
|
||||
|
||||
@@ -44,24 +44,29 @@ namespace DiscImageChef.Server
|
||||
/// <param name="testedMedia">List of tested media</param>
|
||||
public static void Report(IEnumerable<TestedSequentialMedia> testedMedia, ref List<string> mediaOneValue)
|
||||
{
|
||||
foreach(TestedSequentialMedia media in testedMedia)
|
||||
foreach (var media in testedMedia)
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
||||
if (!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
||||
{
|
||||
mediaOneValue.Add($"<i>Information for medium named \"{media.MediumTypeName}\"</i>");
|
||||
if(media.MediumType.HasValue) mediaOneValue.Add($"Medium type code: {media.MediumType:X2}h");
|
||||
if (media.MediumType.HasValue) mediaOneValue.Add($"Medium type code: {media.MediumType:X2}h");
|
||||
}
|
||||
else if(media.MediumType.HasValue)
|
||||
else if (media.MediumType.HasValue)
|
||||
{
|
||||
mediaOneValue.Add($"<i>Information for medium type {media.MediumType:X2}h</i>");
|
||||
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
}
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(media.Manufacturer))
|
||||
if (!string.IsNullOrWhiteSpace(media.Manufacturer))
|
||||
mediaOneValue.Add($"Medium manufactured by: {media.Manufacturer}");
|
||||
if(!string.IsNullOrWhiteSpace(media.Model)) mediaOneValue.Add($"Medium model: {media.Model}");
|
||||
if (!string.IsNullOrWhiteSpace(media.Model)) mediaOneValue.Add($"Medium model: {media.Model}");
|
||||
|
||||
if(media.Density.HasValue) mediaOneValue.Add($"Medium has density code {media.Density:X2}h");
|
||||
if(media.CanReadMediaSerial == true) mediaOneValue.Add("Drive can read medium serial number.");
|
||||
if(media.MediaIsRecognized) mediaOneValue.Add("Drive recognizes this medium.");
|
||||
if (media.Density.HasValue) mediaOneValue.Add($"Medium has density code {media.Density:X2}h");
|
||||
if (media.CanReadMediaSerial == true) mediaOneValue.Add("Drive can read medium serial number.");
|
||||
if (media.MediaIsRecognized) mediaOneValue.Add("Drive recognizes this medium.");
|
||||
|
||||
mediaOneValue.Add("");
|
||||
}
|
||||
|
||||
@@ -41,51 +41,51 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
public static void Convert(Stats newStats)
|
||||
{
|
||||
DicServerContext ctx = new DicServerContext();
|
||||
var ctx = new DicServerContext();
|
||||
|
||||
if(newStats.Commands != null)
|
||||
if (newStats.Commands != null)
|
||||
{
|
||||
if(newStats.Commands.Analyze > 0)
|
||||
if (newStats.Commands.Analyze > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "analyze");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "analyze");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Analyze, Name = "analyze"});
|
||||
else existing.Count += newStats.Commands.Analyze;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Benchmark > 0)
|
||||
if (newStats.Commands.Benchmark > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "benchmark");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "benchmark");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Benchmark, Name = "benchmark"});
|
||||
else existing.Count += newStats.Commands.Benchmark;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Checksum > 0)
|
||||
if (newStats.Commands.Checksum > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "checksum");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "checksum");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Checksum, Name = "checksum"});
|
||||
else existing.Count += newStats.Commands.Checksum;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Compare > 0)
|
||||
if (newStats.Commands.Compare > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "compare");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "compare");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Compare, Name = "compare"});
|
||||
else existing.Count += newStats.Commands.Compare;
|
||||
}
|
||||
|
||||
if(newStats.Commands.CreateSidecar > 0)
|
||||
if (newStats.Commands.CreateSidecar > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "create-sidecar");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "create-sidecar");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command
|
||||
{
|
||||
Count = newStats.Commands.CreateSidecar, Name = "create-sidecar"
|
||||
@@ -93,127 +93,127 @@ namespace DiscImageChef.Server
|
||||
else existing.Count += newStats.Commands.CreateSidecar;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Decode > 0)
|
||||
if (newStats.Commands.Decode > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "decode");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "decode");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Decode, Name = "decode"});
|
||||
else existing.Count += newStats.Commands.Decode;
|
||||
}
|
||||
|
||||
if(newStats.Commands.DeviceInfo > 0)
|
||||
if (newStats.Commands.DeviceInfo > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-info");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-info");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.DeviceInfo, Name = "device-info"});
|
||||
else existing.Count += newStats.Commands.DeviceInfo;
|
||||
}
|
||||
|
||||
if(newStats.Commands.DeviceReport > 0)
|
||||
if (newStats.Commands.DeviceReport > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-report");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "device-report");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.DeviceReport, Name = "device-report"});
|
||||
else existing.Count += newStats.Commands.DeviceReport;
|
||||
}
|
||||
|
||||
if(newStats.Commands.DumpMedia > 0)
|
||||
if (newStats.Commands.DumpMedia > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "dump-media");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "dump-media");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.DumpMedia, Name = "dump-media"});
|
||||
else existing.Count += newStats.Commands.DumpMedia;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Entropy > 0)
|
||||
if (newStats.Commands.Entropy > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "entropy");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "entropy");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Entropy, Name = "entropy"});
|
||||
else existing.Count += newStats.Commands.Entropy;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Formats > 0)
|
||||
if (newStats.Commands.Formats > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "formats");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "formats");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Formats, Name = "formats"});
|
||||
else existing.Count += newStats.Commands.Formats;
|
||||
}
|
||||
|
||||
if(newStats.Commands.MediaInfo > 0)
|
||||
if (newStats.Commands.MediaInfo > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-info");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-info");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.MediaInfo, Name = "media-info"});
|
||||
else existing.Count += newStats.Commands.MediaInfo;
|
||||
}
|
||||
|
||||
if(newStats.Commands.MediaScan > 0)
|
||||
if (newStats.Commands.MediaScan > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-scan");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "media-scan");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.MediaScan, Name = "media-scan"});
|
||||
else existing.Count += newStats.Commands.MediaScan;
|
||||
}
|
||||
|
||||
if(newStats.Commands.PrintHex > 0)
|
||||
if (newStats.Commands.PrintHex > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "printhex");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "printhex");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.PrintHex, Name = "printhex"});
|
||||
else existing.Count += newStats.Commands.PrintHex;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Verify > 0)
|
||||
if (newStats.Commands.Verify > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "verify");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "verify");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.Verify, Name = "verify"});
|
||||
else existing.Count += newStats.Commands.Verify;
|
||||
}
|
||||
|
||||
if(newStats.Commands.Ls > 0)
|
||||
if (newStats.Commands.Ls > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "ls");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "ls");
|
||||
|
||||
if(existing == null) ctx.Commands.Add(new Command {Count = newStats.Commands.Ls, Name = "ls"});
|
||||
if (existing == null) ctx.Commands.Add(new Command {Count = newStats.Commands.Ls, Name = "ls"});
|
||||
else existing.Count += newStats.Commands.Ls;
|
||||
}
|
||||
|
||||
if(newStats.Commands.ExtractFiles > 0)
|
||||
if (newStats.Commands.ExtractFiles > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "extract-files");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "extract-files");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.ExtractFiles, Name = "extract-files"});
|
||||
else existing.Count += newStats.Commands.ExtractFiles;
|
||||
}
|
||||
|
||||
if(newStats.Commands.ListDevices > 0)
|
||||
if (newStats.Commands.ListDevices > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-devices");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-devices");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.ListDevices, Name = "list-devices"});
|
||||
else existing.Count += newStats.Commands.ListDevices;
|
||||
}
|
||||
|
||||
if(newStats.Commands.ListEncodings > 0)
|
||||
if (newStats.Commands.ListEncodings > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-encodings");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "list-encodings");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command
|
||||
{
|
||||
Count = newStats.Commands.ListEncodings, Name = "list-encodings"
|
||||
@@ -221,139 +221,143 @@ namespace DiscImageChef.Server
|
||||
else existing.Count += newStats.Commands.ListEncodings;
|
||||
}
|
||||
|
||||
if(newStats.Commands.ConvertImage > 0)
|
||||
if (newStats.Commands.ConvertImage > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "convert-image");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "convert-image");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.ConvertImage, Name = "convert-image"});
|
||||
else existing.Count += newStats.Commands.ConvertImage;
|
||||
}
|
||||
|
||||
if(newStats.Commands.ImageInfo > 0)
|
||||
if (newStats.Commands.ImageInfo > 0)
|
||||
{
|
||||
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == "image-info");
|
||||
var existing = ctx.Commands.FirstOrDefault(c => c.Name == "image-info");
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Commands.Add(new Command {Count = newStats.Commands.ImageInfo, Name = "image-info"});
|
||||
else existing.Count += newStats.Commands.ImageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.OperatingSystems != null)
|
||||
foreach(OsStats operatingSystem in newStats.OperatingSystems)
|
||||
if (newStats.OperatingSystems != null)
|
||||
{
|
||||
foreach (var operatingSystem in newStats.OperatingSystems)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(operatingSystem.name) ||
|
||||
string.IsNullOrWhiteSpace(operatingSystem.version)) continue;
|
||||
if (string.IsNullOrWhiteSpace(operatingSystem.name) ||
|
||||
string.IsNullOrWhiteSpace(operatingSystem.version)) continue;
|
||||
|
||||
OperatingSystem existing =
|
||||
ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name &&
|
||||
var existing =
|
||||
ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name &&
|
||||
c.Version == operatingSystem.version);
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.OperatingSystems.Add(new OperatingSystem
|
||||
{
|
||||
Count = operatingSystem.Value,
|
||||
Name = operatingSystem.name,
|
||||
Count = operatingSystem.Value,
|
||||
Name = operatingSystem.name,
|
||||
Version = operatingSystem.version
|
||||
});
|
||||
else existing.Count += operatingSystem.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OperatingSystem existing =
|
||||
var existing =
|
||||
ctx.OperatingSystems.FirstOrDefault(c => c.Name == "Linux" && c.Version == null);
|
||||
|
||||
if(existing == null) ctx.OperatingSystems.Add(new OperatingSystem {Count = 1, Name = "Linux"});
|
||||
if (existing == null) ctx.OperatingSystems.Add(new OperatingSystem {Count = 1, Name = "Linux"});
|
||||
else existing.Count++;
|
||||
}
|
||||
|
||||
if(newStats.Versions != null)
|
||||
foreach(NameValueStats nvs in newStats.Versions)
|
||||
if (newStats.Versions != null)
|
||||
{
|
||||
foreach (var nvs in newStats.Versions)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
if (string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
|
||||
Version existing = ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
|
||||
var existing = ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
|
||||
|
||||
if(existing == null) ctx.Versions.Add(new Version {Count = nvs.Value, Value = nvs.name});
|
||||
if (existing == null) ctx.Versions.Add(new Version {Count = nvs.Value, Value = nvs.name});
|
||||
else existing.Count += nvs.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Version existing = ctx.Versions.FirstOrDefault(c => c.Value == "previous");
|
||||
var existing = ctx.Versions.FirstOrDefault(c => c.Value == "previous");
|
||||
|
||||
if(existing == null) ctx.Versions.Add(new Version {Count = 1, Value = "previous"});
|
||||
if (existing == null) ctx.Versions.Add(new Version {Count = 1, Value = "previous"});
|
||||
else existing.Count++;
|
||||
}
|
||||
|
||||
if(newStats.Filesystems != null)
|
||||
foreach(NameValueStats nvs in newStats.Filesystems)
|
||||
if (newStats.Filesystems != null)
|
||||
foreach (var nvs in newStats.Filesystems)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
if (string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
|
||||
Filesystem existing = ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name);
|
||||
var existing = ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name);
|
||||
|
||||
if(existing == null) ctx.Filesystems.Add(new Filesystem {Count = nvs.Value, Name = nvs.name});
|
||||
if (existing == null) ctx.Filesystems.Add(new Filesystem {Count = nvs.Value, Name = nvs.name});
|
||||
else existing.Count += nvs.Value;
|
||||
}
|
||||
|
||||
if(newStats.Partitions != null)
|
||||
foreach(NameValueStats nvs in newStats.Partitions)
|
||||
if (newStats.Partitions != null)
|
||||
foreach (var nvs in newStats.Partitions)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
if (string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
|
||||
Partition existing = ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name);
|
||||
var existing = ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name);
|
||||
|
||||
if(existing == null) ctx.Partitions.Add(new Partition {Count = nvs.Value, Name = nvs.name});
|
||||
if (existing == null) ctx.Partitions.Add(new Partition {Count = nvs.Value, Name = nvs.name});
|
||||
else existing.Count += nvs.Value;
|
||||
}
|
||||
|
||||
if(newStats.MediaImages != null)
|
||||
foreach(NameValueStats nvs in newStats.MediaImages)
|
||||
if (newStats.MediaImages != null)
|
||||
foreach (var nvs in newStats.MediaImages)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
if (string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
|
||||
MediaFormat existing = ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name);
|
||||
var existing = ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name);
|
||||
|
||||
if(existing == null) ctx.MediaFormats.Add(new MediaFormat {Count = nvs.Value, Name = nvs.name});
|
||||
if (existing == null) ctx.MediaFormats.Add(new MediaFormat {Count = nvs.Value, Name = nvs.name});
|
||||
else existing.Count += nvs.Value;
|
||||
}
|
||||
|
||||
if(newStats.Filters != null)
|
||||
foreach(NameValueStats nvs in newStats.Filters)
|
||||
if (newStats.Filters != null)
|
||||
foreach (var nvs in newStats.Filters)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
if (string.IsNullOrWhiteSpace(nvs.name)) continue;
|
||||
|
||||
Filter existing = ctx.Filters.FirstOrDefault(c => c.Name == nvs.name);
|
||||
var existing = ctx.Filters.FirstOrDefault(c => c.Name == nvs.name);
|
||||
|
||||
if(existing == null) ctx.Filters.Add(new Filter {Count = nvs.Value, Name = nvs.name});
|
||||
if (existing == null) ctx.Filters.Add(new Filter {Count = nvs.Value, Name = nvs.name});
|
||||
else existing.Count += nvs.Value;
|
||||
}
|
||||
|
||||
if(newStats.Devices != null)
|
||||
foreach(DeviceStats device in newStats.Devices)
|
||||
if (newStats.Devices != null)
|
||||
foreach (var device in newStats.Devices)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(device.Model)) continue;
|
||||
if (string.IsNullOrWhiteSpace(device.Model)) continue;
|
||||
|
||||
if(!ctx.DeviceStats.Any(c => c.Bus == device.Bus && c.Manufacturer == device.Manufacturer &&
|
||||
c.Model == device.Model && c.Revision == device.Revision))
|
||||
if (!ctx.DeviceStats.Any(c => c.Bus == device.Bus && c.Manufacturer == device.Manufacturer &&
|
||||
c.Model == device.Model && c.Revision == device.Revision))
|
||||
ctx.DeviceStats.Add(new DeviceStat
|
||||
{
|
||||
Bus = device.Bus,
|
||||
Bus = device.Bus,
|
||||
Manufacturer = device.Manufacturer,
|
||||
Model = device.Model,
|
||||
Revision = device.Revision
|
||||
Model = device.Model,
|
||||
Revision = device.Revision
|
||||
});
|
||||
}
|
||||
|
||||
if(newStats.Medias != null)
|
||||
foreach(MediaStats media in newStats.Medias)
|
||||
if (newStats.Medias != null)
|
||||
foreach (var media in newStats.Medias)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(media.type)) continue;
|
||||
if (string.IsNullOrWhiteSpace(media.type)) continue;
|
||||
|
||||
Media existing = ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real);
|
||||
var existing = ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real);
|
||||
|
||||
if(existing == null)
|
||||
if (existing == null)
|
||||
ctx.Medias.Add(new Media {Count = media.Value, Real = media.real, Type = media.type});
|
||||
else existing.Count += media.Value;
|
||||
}
|
||||
|
||||
@@ -44,259 +44,282 @@ namespace DiscImageChef.Server.App_Start
|
||||
/// <param name="testedMedias">List of tested media</param>
|
||||
public static void Report(List<CommonTypes.Metadata.TestedMedia> testedMedias, ref List<string> mediaOneValue)
|
||||
{
|
||||
foreach(CommonTypes.Metadata.TestedMedia testedMedia in testedMedias)
|
||||
foreach (var testedMedia in testedMedias)
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.MediumTypeName))
|
||||
if (!string.IsNullOrWhiteSpace(testedMedia.MediumTypeName))
|
||||
{
|
||||
mediaOneValue.Add($"<i>Information for medium named \"{testedMedia.MediumTypeName}\"</i>");
|
||||
if(testedMedia.MediumType != null)
|
||||
if (testedMedia.MediumType != null)
|
||||
mediaOneValue.Add($"Medium type code: {testedMedia.MediumType:X2}h");
|
||||
}
|
||||
else if(testedMedia.MediumType != null)
|
||||
else if (testedMedia.MediumType != null)
|
||||
{
|
||||
mediaOneValue.Add($"<i>Information for medium type {testedMedia.MediumType:X2}h</i>");
|
||||
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
}
|
||||
|
||||
mediaOneValue.Add(testedMedia.MediaIsRecognized
|
||||
? "Drive recognizes this medium."
|
||||
: "Drive does not recognize this medium.");
|
||||
? "Drive recognizes this medium."
|
||||
: "Drive does not recognize this medium.");
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.Manufacturer))
|
||||
if (!string.IsNullOrWhiteSpace(testedMedia.Manufacturer))
|
||||
mediaOneValue.Add($"Medium manufactured by: {testedMedia.Manufacturer}");
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.Model))
|
||||
if (!string.IsNullOrWhiteSpace(testedMedia.Model))
|
||||
mediaOneValue.Add($"Medium model: {testedMedia.Model}");
|
||||
if(testedMedia.Density != null) mediaOneValue.Add($"Density code: {testedMedia.Density:X2}h");
|
||||
if (testedMedia.Density != null) mediaOneValue.Add($"Density code: {testedMedia.Density:X2}h");
|
||||
|
||||
if(testedMedia.BlockSize != null)
|
||||
if (testedMedia.BlockSize != null)
|
||||
mediaOneValue.Add($"Logical sector size: {testedMedia.BlockSize} bytes");
|
||||
if(testedMedia.PhysicalBlockSize != null)
|
||||
if (testedMedia.PhysicalBlockSize != null)
|
||||
mediaOneValue.Add($"Physical sector size: {testedMedia.PhysicalBlockSize} bytes");
|
||||
if(testedMedia.LongBlockSize != null)
|
||||
if (testedMedia.LongBlockSize != null)
|
||||
mediaOneValue.Add($"READ LONG sector size: {testedMedia.LongBlockSize} bytes");
|
||||
|
||||
if(testedMedia.Blocks != null && testedMedia.BlockSize != null)
|
||||
if (testedMedia.Blocks != null && testedMedia.BlockSize != null)
|
||||
{
|
||||
mediaOneValue.Add($"Medium has {testedMedia.Blocks} blocks of {testedMedia.BlockSize} bytes each");
|
||||
|
||||
if(testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
if (testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
.Add(
|
||||
$"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double) (testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if (testedMedia.Blocks * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add(
|
||||
$"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double) (testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add(
|
||||
$"Medium size: {testedMedia.Blocks * testedMedia.BlockSize} bytes, {testedMedia.Blocks * testedMedia.BlockSize / 1000 / 1000} Mb, {(double) (testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.CHS != null && testedMedia.CurrentCHS != null)
|
||||
if (testedMedia.CHS != null && testedMedia.CurrentCHS != null)
|
||||
{
|
||||
int currentSectors = testedMedia.CurrentCHS.Cylinders * testedMedia.CurrentCHS.Heads *
|
||||
var currentSectors = testedMedia.CurrentCHS.Cylinders * testedMedia.CurrentCHS.Heads *
|
||||
testedMedia.CurrentCHS.Sectors;
|
||||
mediaOneValue
|
||||
.Add($"Cylinders: {testedMedia.CHS.Cylinders} max., {testedMedia.CurrentCHS.Cylinders} current");
|
||||
.Add(
|
||||
$"Cylinders: {testedMedia.CHS.Cylinders} max., {testedMedia.CurrentCHS.Cylinders} current");
|
||||
mediaOneValue.Add($"Heads: {testedMedia.CHS.Heads} max., {testedMedia.CurrentCHS.Heads} current");
|
||||
mediaOneValue
|
||||
.Add($"Sectors per track: {testedMedia.CHS.Sectors} max., {testedMedia.CurrentCHS.Sectors} current");
|
||||
.Add(
|
||||
$"Sectors per track: {testedMedia.CHS.Sectors} max., {testedMedia.CurrentCHS.Sectors} current");
|
||||
mediaOneValue
|
||||
.Add($"Sectors addressable in CHS mode: {testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors} max., {currentSectors} current");
|
||||
.Add(
|
||||
$"Sectors addressable in CHS mode: {testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors} max., {currentSectors} current");
|
||||
mediaOneValue
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add(
|
||||
$"Medium size in CHS mode: {(ulong) currentSectors * testedMedia.BlockSize} bytes, {(ulong) currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double) ((ulong) currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
else if(testedMedia.CHS != null)
|
||||
else if (testedMedia.CHS != null)
|
||||
{
|
||||
int currentSectors = testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors;
|
||||
var currentSectors = testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors;
|
||||
mediaOneValue.Add($"Cylinders: {testedMedia.CHS.Cylinders}");
|
||||
mediaOneValue.Add($"Heads: {testedMedia.CHS.Heads}");
|
||||
mediaOneValue.Add($"Sectors per track: {testedMedia.CHS.Sectors}");
|
||||
mediaOneValue.Add($"Sectors addressable in CHS mode: {currentSectors}");
|
||||
mediaOneValue
|
||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add(
|
||||
$"Medium size in CHS mode: {(ulong) currentSectors * testedMedia.BlockSize} bytes, {(ulong) currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double) ((ulong) currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.LBASectors != null)
|
||||
if (testedMedia.LBASectors != null)
|
||||
{
|
||||
mediaOneValue.Add($"Sectors addressable in sectors in 28-bit LBA mode: {testedMedia.LBASectors}");
|
||||
|
||||
if((ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
if ((ulong) testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if((ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
.Add(
|
||||
$"Medium size in 28-bit LBA mode: {(ulong) testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong) testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double) ((ulong) testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if ((ulong) testedMedia.LBASectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add(
|
||||
$"Medium size in 28-bit LBA mode: {(ulong) testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong) testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double) ((ulong) testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add(
|
||||
$"Medium size in 28-bit LBA mode: {(ulong) testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong) testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double) ((ulong) testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.LBA48Sectors != null)
|
||||
if (testedMedia.LBA48Sectors != null)
|
||||
{
|
||||
mediaOneValue.Add($"Sectors addressable in sectors in 48-bit LBA mode: {testedMedia.LBA48Sectors}");
|
||||
|
||||
if(testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
if (testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
.Add(
|
||||
$"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double) (testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if (testedMedia.LBA48Sectors * testedMedia.BlockSize / 1024 / 1024 > 1000)
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
.Add(
|
||||
$"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000 / 1000} Gb, {(double) (testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
mediaOneValue
|
||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
.Add(
|
||||
$"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double) (testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(testedMedia.NominalRotationRate != null && testedMedia.NominalRotationRate != 0x0000 &&
|
||||
testedMedia.NominalRotationRate != 0xFFFF)
|
||||
if (testedMedia.NominalRotationRate != null && testedMedia.NominalRotationRate != 0x0000 &&
|
||||
testedMedia.NominalRotationRate != 0xFFFF)
|
||||
mediaOneValue.Add(testedMedia.NominalRotationRate == 0x0001
|
||||
? "Medium does not rotate."
|
||||
: $"Medium rotates at {testedMedia.NominalRotationRate} rpm");
|
||||
? "Medium does not rotate."
|
||||
: $"Medium rotates at {testedMedia.NominalRotationRate} rpm");
|
||||
|
||||
if(testedMedia.BlockSize != null &&
|
||||
testedMedia.PhysicalBlockSize != null &&
|
||||
testedMedia.BlockSize.Value != testedMedia.PhysicalBlockSize.Value &&
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||
if (testedMedia.BlockSize != null &&
|
||||
testedMedia.PhysicalBlockSize != null &&
|
||||
testedMedia.BlockSize.Value != testedMedia.PhysicalBlockSize.Value &&
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||
mediaOneValue
|
||||
.Add($"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
||||
.Add(
|
||||
$"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
||||
|
||||
if(testedMedia.SupportsReadSectors == true)
|
||||
if (testedMedia.SupportsReadSectors == true)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadRetry == true)
|
||||
if (testedMedia.SupportsReadRetry == true)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) RETRY command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadDma == true)
|
||||
if (testedMedia.SupportsReadDma == true)
|
||||
mediaOneValue.Add("Device can use the READ DMA command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaRetry == true)
|
||||
if (testedMedia.SupportsReadDmaRetry == true)
|
||||
mediaOneValue.Add("Device can use the READ DMA RETRY command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadLong == true)
|
||||
if (testedMedia.SupportsReadLong == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadLongRetry == true)
|
||||
if (testedMedia.SupportsReadLongRetry == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG RETRY command in CHS mode with this medium");
|
||||
|
||||
if(testedMedia.SupportsReadLba == true)
|
||||
if (testedMedia.SupportsReadLba == true)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadRetryLba == true)
|
||||
if (testedMedia.SupportsReadRetryLba == true)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaLba == true)
|
||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
if (testedMedia.SupportsReadDmaLba == true)
|
||||
mediaOneValue.Add("Device can use the READ DMA command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaRetryLba == true)
|
||||
if (testedMedia.SupportsReadDmaRetryLba == true)
|
||||
mediaOneValue.Add("Device can use the READ DMA RETRY command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadLongLba == true)
|
||||
if (testedMedia.SupportsReadLongLba == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadLongRetryLba == true)
|
||||
if (testedMedia.SupportsReadLongRetryLba == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG RETRY command in 28-bit LBA mode with this medium");
|
||||
|
||||
if(testedMedia.SupportsReadLba48 == true)
|
||||
if (testedMedia.SupportsReadLba48 == true)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 48-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaLba48 == true)
|
||||
if (testedMedia.SupportsReadDmaLba48 == true)
|
||||
mediaOneValue.Add("Device can use the READ DMA command in 48-bit LBA mode with this medium");
|
||||
|
||||
if(testedMedia.SupportsSeek == true)
|
||||
if (testedMedia.SupportsSeek == true)
|
||||
mediaOneValue.Add("Device can use the SEEK command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsSeekLba == true)
|
||||
if (testedMedia.SupportsSeekLba == true)
|
||||
mediaOneValue.Add("Device can use the SEEK command in 28-bit LBA mode with this medium");
|
||||
|
||||
if(testedMedia.SupportsReadCapacity == true)
|
||||
if (testedMedia.SupportsReadCapacity == true)
|
||||
mediaOneValue.Add("Device can use the READ CAPACITY (10) command with this medium");
|
||||
if(testedMedia.SupportsReadCapacity16 == true)
|
||||
if (testedMedia.SupportsReadCapacity16 == true)
|
||||
mediaOneValue.Add("Device can use the READ CAPACITY (16) command with this medium");
|
||||
if(testedMedia.SupportsRead6 == true)
|
||||
if (testedMedia.SupportsRead6 == true)
|
||||
mediaOneValue.Add("Device can use the READ (6) command with this medium");
|
||||
if(testedMedia.SupportsRead10 == true)
|
||||
if (testedMedia.SupportsRead10 == true)
|
||||
mediaOneValue.Add("Device can use the READ (10) command with this medium");
|
||||
if(testedMedia.SupportsRead12 == true)
|
||||
if (testedMedia.SupportsRead12 == true)
|
||||
mediaOneValue.Add("Device can use the READ (12) command with this medium");
|
||||
if(testedMedia.SupportsRead16 == true)
|
||||
if (testedMedia.SupportsRead16 == true)
|
||||
mediaOneValue.Add("Device can use the READ (16) command with this medium");
|
||||
if(testedMedia.SupportsReadLong == true)
|
||||
if (testedMedia.SupportsReadLong == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG (10) command with this medium");
|
||||
if(testedMedia.SupportsReadLong16 == true)
|
||||
if (testedMedia.SupportsReadLong16 == true)
|
||||
mediaOneValue.Add("Device can use the READ LONG (16) command with this medium");
|
||||
|
||||
if(testedMedia.SupportsReadCd == true)
|
||||
if (testedMedia.SupportsReadCd == true)
|
||||
mediaOneValue.Add("Device can use the READ CD command with LBA addressing with this medium");
|
||||
if(testedMedia.SupportsReadCdMsf == true)
|
||||
if (testedMedia.SupportsReadCdMsf == true)
|
||||
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium");
|
||||
if(testedMedia.SupportsReadCdRaw == true)
|
||||
if (testedMedia.SupportsReadCdRaw == true)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
if(testedMedia.SupportsReadCdMsfRaw == true)
|
||||
.Add(
|
||||
"Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
if (testedMedia.SupportsReadCdMsfRaw == true)
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
.Add(
|
||||
"Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
|
||||
if(testedMedia.SupportsHLDTSTReadRawDVD == true)
|
||||
if (testedMedia.SupportsHLDTSTReadRawDVD == true)
|
||||
mediaOneValue.Add("Device can use the HL-DT-ST vendor READ DVD (RAW) command with this medium");
|
||||
if(testedMedia.SupportsNECReadCDDA == true)
|
||||
if (testedMedia.SupportsNECReadCDDA == true)
|
||||
mediaOneValue.Add("Device can use the NEC vendor READ CD-DA command with this medium");
|
||||
if(testedMedia.SupportsPioneerReadCDDA == true)
|
||||
if (testedMedia.SupportsPioneerReadCDDA == true)
|
||||
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA command with this medium");
|
||||
if(testedMedia.SupportsPioneerReadCDDAMSF == true)
|
||||
if (testedMedia.SupportsPioneerReadCDDAMSF == true)
|
||||
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA MSF command with this medium");
|
||||
if(testedMedia.SupportsPlextorReadCDDA == true)
|
||||
if (testedMedia.SupportsPlextorReadCDDA == true)
|
||||
mediaOneValue.Add("Device can use the PLEXTOR vendor READ CD-DA command with this medium");
|
||||
if(testedMedia.SupportsPlextorReadRawDVD == true)
|
||||
if (testedMedia.SupportsPlextorReadRawDVD == true)
|
||||
mediaOneValue.Add("Device can use the PLEXOR vendor READ DVD (RAW) command with this medium");
|
||||
|
||||
if(testedMedia.CanReadAACS == true)
|
||||
if (testedMedia.CanReadAACS == true)
|
||||
mediaOneValue.Add("Device can read the Advanced Access Content System from this medium");
|
||||
if(testedMedia.CanReadADIP == true)
|
||||
if (testedMedia.CanReadADIP == true)
|
||||
mediaOneValue.Add("Device can read the DVD ADress-In-Pregroove from this medium");
|
||||
if(testedMedia.CanReadATIP == true)
|
||||
if (testedMedia.CanReadATIP == true)
|
||||
mediaOneValue.Add("Device can read the CD Absolute-Time-In-Pregroove from this medium");
|
||||
if(testedMedia.CanReadBCA == true)
|
||||
if (testedMedia.CanReadBCA == true)
|
||||
mediaOneValue.Add("Device can read the Burst Cutting Area from this medium");
|
||||
if(testedMedia.CanReadC2Pointers == true)
|
||||
if (testedMedia.CanReadC2Pointers == true)
|
||||
mediaOneValue.Add("Device can report the C2 pointers when reading from this medium");
|
||||
if(testedMedia.CanReadCMI == true)
|
||||
if (testedMedia.CanReadCMI == true)
|
||||
mediaOneValue.Add("Device can read the Copyright Management Information from this medium");
|
||||
if(testedMedia.CanReadCorrectedSubchannel == true)
|
||||
if (testedMedia.CanReadCorrectedSubchannel == true)
|
||||
mediaOneValue.Add("Device can correct subchannels when reading from this medium");
|
||||
if(testedMedia.CanReadCorrectedSubchannelWithC2 == true)
|
||||
if (testedMedia.CanReadCorrectedSubchannelWithC2 == true)
|
||||
mediaOneValue
|
||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
if(testedMedia.CanReadDCB == true)
|
||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
if (testedMedia.CanReadDCB == true)
|
||||
mediaOneValue.Add("Device can read the Disc Control Blocks from this medium");
|
||||
if(testedMedia.CanReadDDS == true)
|
||||
if (testedMedia.CanReadDDS == true)
|
||||
mediaOneValue.Add("Device can read the Disc Definition Structure from this medium");
|
||||
if(testedMedia.CanReadDMI == true)
|
||||
if (testedMedia.CanReadDMI == true)
|
||||
mediaOneValue.Add("Device can read the Disc Manufacurer Information from this medium");
|
||||
if(testedMedia.CanReadDiscInformation == true)
|
||||
if (testedMedia.CanReadDiscInformation == true)
|
||||
mediaOneValue.Add("Device can read the Disc Information from this medium");
|
||||
if(testedMedia.CanReadFullTOC == true)
|
||||
if (testedMedia.CanReadFullTOC == true)
|
||||
mediaOneValue.Add("Device can read the Table of Contents from this medium, without processing it");
|
||||
if(testedMedia.CanReadHDCMI == true)
|
||||
if (testedMedia.CanReadHDCMI == true)
|
||||
mediaOneValue.Add("Device can read the HD DVD Copyright Management Information from this medium");
|
||||
if(testedMedia.CanReadLayerCapacity == true)
|
||||
if (testedMedia.CanReadLayerCapacity == true)
|
||||
mediaOneValue.Add("Device can read the layer capacity from this medium");
|
||||
if(testedMedia.CanReadFirstTrackPreGap == true)
|
||||
if (testedMedia.CanReadFirstTrackPreGap == true)
|
||||
mediaOneValue.Add("Device can read the first track's pregap data");
|
||||
if(testedMedia.CanReadLeadIn == true) mediaOneValue.Add("Device can read the Lead-In from this medium");
|
||||
if(testedMedia.CanReadLeadOut == true)
|
||||
if (testedMedia.CanReadLeadIn == true)
|
||||
mediaOneValue.Add("Device can read the Lead-In from this medium");
|
||||
if (testedMedia.CanReadLeadOut == true)
|
||||
mediaOneValue.Add("Device can read the Lead-Out from this medium");
|
||||
if(testedMedia.CanReadMediaID == true)
|
||||
if (testedMedia.CanReadMediaID == true)
|
||||
mediaOneValue.Add("Device can read the Media ID from this medium");
|
||||
if(testedMedia.CanReadMediaSerial == true)
|
||||
if (testedMedia.CanReadMediaSerial == true)
|
||||
mediaOneValue.Add("Device can read the Media Serial Number from this medium");
|
||||
if(testedMedia.CanReadPAC == true) mediaOneValue.Add("Device can read the PAC from this medium");
|
||||
if(testedMedia.CanReadPFI == true)
|
||||
if (testedMedia.CanReadPAC == true) mediaOneValue.Add("Device can read the PAC from this medium");
|
||||
if (testedMedia.CanReadPFI == true)
|
||||
mediaOneValue.Add("Device can read the Physical Format Information from this medium");
|
||||
if(testedMedia.CanReadPMA == true)
|
||||
if (testedMedia.CanReadPMA == true)
|
||||
mediaOneValue.Add("Device can read the Power Management Area from this medium");
|
||||
if(testedMedia.CanReadPQSubchannel == true)
|
||||
if (testedMedia.CanReadPQSubchannel == true)
|
||||
mediaOneValue.Add("Device can read the P to Q subchannels from this medium");
|
||||
if(testedMedia.CanReadPQSubchannelWithC2 == true)
|
||||
if (testedMedia.CanReadPQSubchannelWithC2 == true)
|
||||
mediaOneValue
|
||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadPRI == true)
|
||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
if (testedMedia.CanReadPRI == true)
|
||||
mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium");
|
||||
if(testedMedia.CanReadRWSubchannel == true)
|
||||
if (testedMedia.CanReadRWSubchannel == true)
|
||||
mediaOneValue.Add("Device can read the R to W subchannels from this medium");
|
||||
if(testedMedia.CanReadRWSubchannelWithC2 == true)
|
||||
if (testedMedia.CanReadRWSubchannelWithC2 == true)
|
||||
mediaOneValue
|
||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadRecordablePFI == true)
|
||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
if (testedMedia.CanReadRecordablePFI == true)
|
||||
mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium");
|
||||
if(testedMedia.CanReadSpareAreaInformation == true)
|
||||
if (testedMedia.CanReadSpareAreaInformation == true)
|
||||
mediaOneValue.Add("Device can read the Spare Area Information from this medium");
|
||||
if(testedMedia.CanReadTOC == true)
|
||||
if (testedMedia.CanReadTOC == true)
|
||||
mediaOneValue.Add("Device can read the Table of Contents from this medium");
|
||||
|
||||
mediaOneValue.Add("");
|
||||
|
||||
Reference in New Issue
Block a user