mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -42,28 +42,19 @@ namespace DiscImageChef.Server.App_Start
|
||||
foreach(pageType evpd in pages)
|
||||
{
|
||||
string decoded;
|
||||
if(evpd.page >= 0x01 && evpd.page <= 0x7F)
|
||||
decoded = Decoders.SCSI.EVPD.DecodeASCIIPage(evpd.value);
|
||||
else if(evpd.page == 0x81)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_81(evpd.value);
|
||||
else if(evpd.page == 0x82)
|
||||
decoded = Decoders.SCSI.EVPD.DecodePage82(evpd.value);
|
||||
else if(evpd.page == 0x83)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_83(evpd.value);
|
||||
else if(evpd.page == 0x84)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_84(evpd.value);
|
||||
else if(evpd.page == 0x85)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_85(evpd.value);
|
||||
else if(evpd.page == 0x86)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_86(evpd.value);
|
||||
else if(evpd.page == 0x89)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_89(evpd.value);
|
||||
else if(evpd.page == 0xB0)
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_B0(evpd.value);
|
||||
if(evpd.page >= 0x01 && evpd.page <= 0x7F) decoded = Decoders.SCSI.EVPD.DecodeASCIIPage(evpd.value);
|
||||
else if(evpd.page == 0x81) decoded = Decoders.SCSI.EVPD.PrettifyPage_81(evpd.value);
|
||||
else if(evpd.page == 0x82) decoded = Decoders.SCSI.EVPD.DecodePage82(evpd.value);
|
||||
else if(evpd.page == 0x83) decoded = Decoders.SCSI.EVPD.PrettifyPage_83(evpd.value);
|
||||
else if(evpd.page == 0x84) decoded = Decoders.SCSI.EVPD.PrettifyPage_84(evpd.value);
|
||||
else if(evpd.page == 0x85) decoded = Decoders.SCSI.EVPD.PrettifyPage_85(evpd.value);
|
||||
else if(evpd.page == 0x86) decoded = Decoders.SCSI.EVPD.PrettifyPage_86(evpd.value);
|
||||
else if(evpd.page == 0x89) decoded = Decoders.SCSI.EVPD.PrettifyPage_89(evpd.value);
|
||||
else if(evpd.page == 0xB0) decoded = Decoders.SCSI.EVPD.PrettifyPage_B0(evpd.value);
|
||||
else if(evpd.page == 0xB2)
|
||||
decoded = string.Format("TapeAlert Supported Flags Bitmap: 0x{0:X16}<br/>", Decoders.SCSI.EVPD.DecodePageB2(evpd.value));
|
||||
else if(evpd.page == 0xB4)
|
||||
decoded = Decoders.SCSI.EVPD.DecodePageB4(evpd.value);
|
||||
decoded = string.Format("TapeAlert Supported Flags Bitmap: 0x{0:X16}<br/>",
|
||||
Decoders.SCSI.EVPD.DecodePageB2(evpd.value));
|
||||
else if(evpd.page == 0xB4) decoded = Decoders.SCSI.EVPD.DecodePageB4(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "quantum")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_Quantum(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "seagate")
|
||||
@@ -74,22 +65,21 @@ namespace DiscImageChef.Server.App_Start
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C1_IBM(evpd.value);
|
||||
else if((evpd.page == 0xC0 || evpd.page == 0xC1) && vendor.Trim() == "certance")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_C1_Certance(evpd.value);
|
||||
else if((evpd.page == 0xC2 || evpd.page == 0xC3 || evpd.page == 0xC4 || evpd.page == 0xC5 || evpd.page == 0xC6) &&
|
||||
else if((evpd.page == 0xC2 || evpd.page == 0xC3 || evpd.page == 0xC4 || evpd.page == 0xC5 ||
|
||||
evpd.page == 0xC6) &&
|
||||
vendor.Trim() == "certance")
|
||||
decoded = Decoders.SCSI.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 = Decoders.SCSI.EVPD.PrettifyPage_C0_to_C5_HP(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 = Decoders.SCSI.EVPD.PrettifyPage_C0_to_C5_HP(evpd.value);
|
||||
else if(evpd.page == 0xDF && vendor.Trim() == "certance")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_DF_Certance(evpd.value);
|
||||
else
|
||||
decoded = "Undecoded";
|
||||
else decoded = "Undecoded";
|
||||
|
||||
if(!string.IsNullOrEmpty(decoded)) decoded = decoded.Replace("\n", "<br/>");
|
||||
|
||||
if(!string.IsNullOrEmpty(decoded))
|
||||
decoded = decoded.Replace("\n", "<br/>");
|
||||
|
||||
evpdPages.Add(string.Format("EVPD page {0:X2}h", evpd.page), decoded);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device is connected but unsupported.");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Vendor value {0} set in Peripheral Qualifier field.", inquiry.PeripheralQualifier));
|
||||
scsiOneValue.Add(string.Format("Vendor value {0} set in Peripheral Qualifier field.",
|
||||
inquiry.PeripheralQualifier));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -133,7 +134,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Unknown or no device type");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Unknown device type field value 0x{0:X2}", inquiry.PeripheralDeviceType));
|
||||
scsiOneValue.Add(string.Format("Unknown device type field value 0x{0:X2}",
|
||||
inquiry.PeripheralDeviceType));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -161,7 +163,9 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device claims to comply with ANSI X3.408:2005 (SPC-4)");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Device claims to comply with unknown SCSI ANSI standard value 0x{0:X2})", inquiry.ANSIVersion));
|
||||
scsiOneValue
|
||||
.Add(string.Format("Device claims to comply with unknown SCSI ANSI standard value 0x{0:X2})",
|
||||
inquiry.ANSIVersion));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -174,7 +178,9 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device claims to comply ECMA-111: Small Computer System Interface SCSI");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Device claims to comply with unknown SCSI ECMA standard value 0x{0:X2})", inquiry.ECMAVersion));
|
||||
scsiOneValue
|
||||
.Add(string.Format("Device claims to comply with unknown SCSI ECMA standard value 0x{0:X2})",
|
||||
inquiry.ECMAVersion));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -187,62 +193,39 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device claims to comply with ISO/IEC 9316:1995");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Device claims to comply with unknown SCSI ISO/IEC standard value 0x{0:X2})", inquiry.ISOVersion));
|
||||
scsiOneValue
|
||||
.Add(string.Format("Device claims to comply with unknown SCSI ISO/IEC standard value 0x{0:X2})",
|
||||
inquiry.ISOVersion));
|
||||
break;
|
||||
}
|
||||
|
||||
if(inquiry.Removable)
|
||||
scsiOneValue.Add("Device is removable");
|
||||
if(inquiry.AERCSupported)
|
||||
scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
||||
if(inquiry.TerminateTaskSupported)
|
||||
scsiOneValue.Add("Device supports TERMINATE TASK command");
|
||||
if(inquiry.NormalACA)
|
||||
scsiOneValue.Add("Device supports setting Normal ACA");
|
||||
if(inquiry.HierarchicalLUN)
|
||||
scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
||||
if(inquiry.StorageArrayController)
|
||||
scsiOneValue.Add("Device contains an embedded storage array controller");
|
||||
if(inquiry.AccessControlCoordinator)
|
||||
scsiOneValue.Add("Device contains an Access Control Coordinator");
|
||||
if(inquiry.ThirdPartyCopy)
|
||||
scsiOneValue.Add("Device supports third-party copy commands");
|
||||
if(inquiry.Protection)
|
||||
scsiOneValue.Add("Device supports protection information");
|
||||
if(inquiry.BasicQueueing)
|
||||
scsiOneValue.Add("Device supports basic queueing");
|
||||
if(inquiry.EnclosureServices)
|
||||
scsiOneValue.Add("Device contains an embedded enclosure services component");
|
||||
if(inquiry.MultiPortDevice)
|
||||
scsiOneValue.Add("Multi-port device");
|
||||
if(inquiry.MediumChanger)
|
||||
scsiOneValue.Add("Device contains or is attached to a medium changer");
|
||||
if(inquiry.ACKRequests)
|
||||
scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
||||
if(inquiry.Address32)
|
||||
scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
||||
if(inquiry.Address16)
|
||||
scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
||||
if(inquiry.RelativeAddressing)
|
||||
scsiOneValue.Add("Device supports relative addressing");
|
||||
if(inquiry.WideBus32)
|
||||
scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
||||
if(inquiry.WideBus16)
|
||||
scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
||||
if(inquiry.SyncTransfer)
|
||||
scsiOneValue.Add("Device supports synchronous data transfer");
|
||||
if(inquiry.LinkedCommands)
|
||||
scsiOneValue.Add("Device supports linked commands");
|
||||
if(inquiry.Removable) scsiOneValue.Add("Device is removable");
|
||||
if(inquiry.AERCSupported) scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
||||
if(inquiry.TerminateTaskSupported) scsiOneValue.Add("Device supports TERMINATE TASK command");
|
||||
if(inquiry.NormalACA) scsiOneValue.Add("Device supports setting Normal ACA");
|
||||
if(inquiry.HierarchicalLUN) scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
||||
if(inquiry.StorageArrayController) scsiOneValue.Add("Device contains an embedded storage array controller");
|
||||
if(inquiry.AccessControlCoordinator) scsiOneValue.Add("Device contains an Access Control Coordinator");
|
||||
if(inquiry.ThirdPartyCopy) scsiOneValue.Add("Device supports third-party copy commands");
|
||||
if(inquiry.Protection) scsiOneValue.Add("Device supports protection information");
|
||||
if(inquiry.BasicQueueing) scsiOneValue.Add("Device supports basic queueing");
|
||||
if(inquiry.EnclosureServices) scsiOneValue.Add("Device contains an embedded enclosure services component");
|
||||
if(inquiry.MultiPortDevice) scsiOneValue.Add("Multi-port device");
|
||||
if(inquiry.MediumChanger) scsiOneValue.Add("Device contains or is attached to a medium changer");
|
||||
if(inquiry.ACKRequests) scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
||||
if(inquiry.Address32) scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
||||
if(inquiry.Address16) scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
||||
if(inquiry.RelativeAddressing) scsiOneValue.Add("Device supports relative addressing");
|
||||
if(inquiry.WideBus32) scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
||||
if(inquiry.WideBus16) scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
||||
if(inquiry.SyncTransfer) scsiOneValue.Add("Device supports synchronous data transfer");
|
||||
if(inquiry.LinkedCommands) scsiOneValue.Add("Device supports linked commands");
|
||||
if(inquiry.TranferDisable)
|
||||
scsiOneValue.Add("Device supports CONTINUE TASK and TARGET TRANSFER DISABLE commands");
|
||||
if(inquiry.QAS)
|
||||
scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
||||
if(inquiry.TaggedCommandQueue)
|
||||
scsiOneValue.Add("Device supports TCQ queue");
|
||||
if(inquiry.IUS)
|
||||
scsiOneValue.Add("Device supports information unit transfers");
|
||||
if(inquiry.SoftReset)
|
||||
scsiOneValue.Add("Device implements RESET as a soft reset");
|
||||
if(inquiry.QAS) scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
||||
if(inquiry.TaggedCommandQueue) scsiOneValue.Add("Device supports TCQ queue");
|
||||
if(inquiry.IUS) scsiOneValue.Add("Device supports information unit transfers");
|
||||
if(inquiry.SoftReset) scsiOneValue.Add("Device implements RESET as a soft reset");
|
||||
|
||||
switch((TGPSValues)inquiry.AsymmetricalLUNAccess)
|
||||
{
|
||||
@@ -259,7 +242,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device supports implicit and explicit assymetrical access");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Unknown value in TPGS field 0x{0:X2}", inquiry.AsymmetricalLUNAccess));
|
||||
scsiOneValue.Add(string.Format("Unknown value in TPGS field 0x{0:X2}",
|
||||
inquiry.AsymmetricalLUNAccess));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -278,7 +262,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device supports ST and DT clocking");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Unknown value in SPI clocking field 0x{0:X2}", inquiry.SPIClocking));
|
||||
scsiOneValue.Add(string.Format("Unknown value in SPI clocking field 0x{0:X2}",
|
||||
inquiry.SPIClocking));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -289,8 +274,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
switch(VersionDescriptor)
|
||||
{
|
||||
case 0xFFFF:
|
||||
case 0x0000:
|
||||
break;
|
||||
case 0x0000: break;
|
||||
case 0x0020:
|
||||
scsiOneValue.Add("Device complies with SAM (no version claimed)");
|
||||
break;
|
||||
@@ -418,10 +402,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with SES ANSI INCITS 305-1998");
|
||||
break;
|
||||
case 0x01DD:
|
||||
scsiOneValue.Add("Device complies with SES T10/1212 revision 08b w/ Amendment ANSI INCITS.305/AM1-2000");
|
||||
scsiOneValue
|
||||
.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");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -757,7 +743,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with MMC-6 ANSI INCITS 468-2010");
|
||||
break;
|
||||
case 0x04E7:
|
||||
scsiOneValue.Add("Device complies with MMC-6 ANSI INCITS 468-2010 + MMC-6/AM1 ANSI INCITS 468-2010/AM 1");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -949,7 +936,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
case 0x097D:
|
||||
case 0x097E:
|
||||
case 0x097F:
|
||||
scsiOneValue.Add(string.Format("Device complies with iSCSI revision {0}", VersionDescriptor & 0x1F));
|
||||
scsiOneValue.Add(string.Format("Device complies with iSCSI revision {0}",
|
||||
VersionDescriptor & 0x1F));
|
||||
break;
|
||||
case 0x0980:
|
||||
scsiOneValue.Add("Device complies with SBP-3 (no version claimed)");
|
||||
@@ -1042,10 +1030,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with SPI ANSI INCITS 253-1995");
|
||||
break;
|
||||
case 0x0ABB:
|
||||
scsiOneValue.Add("Device complies with SPI T10/0855-D revision 15a with SPI Amnd revision 3a");
|
||||
scsiOneValue
|
||||
.Add("Device complies with SPI T10/0855-D revision 15a with SPI Amnd revision 3a");
|
||||
break;
|
||||
case 0x0ABC:
|
||||
scsiOneValue.Add("Device complies with SPI ANSI INCITS 253-1995 with SPI Amnd ANSI INCITS 253/AM1-1998");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -1186,7 +1176,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with SAS-2.1 ANSI INCITS 478-2011");
|
||||
break;
|
||||
case 0x0C4F:
|
||||
scsiOneValue.Add("Device complies with SAS-2.1 ANSI INCITS 478-2011 w/ Amnd 1 ANSI INCITS 478/AM1-2014");
|
||||
scsiOneValue
|
||||
.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");
|
||||
@@ -1213,7 +1204,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with FC-PH ANSI INCITS 230-1994");
|
||||
break;
|
||||
case 0x0D3C:
|
||||
scsiOneValue.Add("Device complies with FC-PH ANSI INCITS 230-1994 with Amnd 1 ANSI INCITS 230/AM1-1996");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -1228,7 +1220,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with FC-AL-2 T11/1133-D revision 7.0");
|
||||
break;
|
||||
case 0x0D63:
|
||||
scsiOneValue.Add("Device complies with FC-AL-2 ANSI INCITS 332-1999 with AM1-2003 & AM2-2006");
|
||||
scsiOneValue
|
||||
.Add("Device complies with FC-AL-2 ANSI INCITS 332-1999 with AM1-2003 & AM2-2006");
|
||||
break;
|
||||
case 0x0D64:
|
||||
scsiOneValue.Add("Device complies with FC-AL-2 ANSI INCITS 332-1999 with Amnd 2 AM2-2006");
|
||||
@@ -1285,7 +1278,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with FC-FS-2 ANSI INCITS 242-2007");
|
||||
break;
|
||||
case 0x0E03:
|
||||
scsiOneValue.Add("Device complies with FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -1342,7 +1336,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with FC 10GFC ISO/IEC 14165-116 with AM1");
|
||||
break;
|
||||
case 0x0EA6:
|
||||
scsiOneValue.Add("Device complies with FC 10GFC ANSI INCITS 364-2003 with AM1 ANSI INCITS 364/AM1-2007");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -1522,19 +1517,23 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with ATA/ATAPI-8 ATA8-AAM (no version claimed)");
|
||||
break;
|
||||
case 0x1621:
|
||||
scsiOneValue.Add("Device complies with ATA/ATAPI-8 ATA8-APT Parallel Transport (no version claimed)");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
scsiOneValue
|
||||
.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");
|
||||
scsiOneValue
|
||||
.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");
|
||||
@@ -1543,7 +1542,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with Universal Serial Bus Specification, Revision 2.0");
|
||||
break;
|
||||
case 0x1730:
|
||||
scsiOneValue.Add("Device complies with USB Mass Storage Class Bulk-Only Transport, Revision 1.0");
|
||||
scsiOneValue
|
||||
.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)");
|
||||
@@ -1624,7 +1624,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with SPL ANSI INCITS 476-2011");
|
||||
break;
|
||||
case 0x20A8:
|
||||
scsiOneValue.Add("Device complies with SPL ANSI INCITS 476-2011 + SPL AM1 INCITS 476/AM1 2012");
|
||||
scsiOneValue
|
||||
.Add("Device complies with SPL ANSI INCITS 476-2011 + SPL AM1 INCITS 476/AM1 2012");
|
||||
break;
|
||||
case 0x20AA:
|
||||
scsiOneValue.Add("Device complies with SPL ISO/IEC 14776-261:2012");
|
||||
@@ -1696,12 +1697,14 @@ namespace DiscImageChef.Server.App_Start
|
||||
scsiOneValue.Add("Device complies with IEEE 1667-2009");
|
||||
break;
|
||||
default:
|
||||
scsiOneValue.Add(string.Format("Device complies with unknown standard code 0x{0:X4}", VersionDescriptor));
|
||||
scsiOneValue.Add(string.Format("Device complies with unknown standard code 0x{0:X4}",
|
||||
VersionDescriptor));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scsiOneValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,142 +42,85 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
if(ftr.SupportsAACS && ftr.AACSVersionSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive supports AACS version {0}", ftr.AACSVersion));
|
||||
else if(ftr.SupportsAACS)
|
||||
mmcOneValue.Add("Drive supports AACS");
|
||||
if(ftr.AGIDsSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive supports {0} AGIDs concurrently", ftr.AGIDs));
|
||||
else if(ftr.SupportsAACS) mmcOneValue.Add("Drive supports AACS");
|
||||
if(ftr.AGIDsSpecified) mmcOneValue.Add(string.Format("Drive supports {0} AGIDs concurrently", ftr.AGIDs));
|
||||
if(ftr.CanGenerateBindingNonce)
|
||||
{
|
||||
mmcOneValue.Add("Drive supports generating the binding nonce");
|
||||
if(ftr.BindingNonceBlocksSpecified)
|
||||
mmcOneValue.Add(string.Format("{0} media blocks are required for the binding nonce", ftr.BindingNonceBlocks));
|
||||
mmcOneValue.Add(string.Format("{0} media blocks are required for the binding nonce",
|
||||
ftr.BindingNonceBlocks));
|
||||
}
|
||||
if(ftr.BlocksPerReadableUnit > 1)
|
||||
mmcOneValue.Add(string.Format("{0} logical blocks per media writable unit", ftr.BlocksPerReadableUnit));
|
||||
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.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)
|
||||
mmcOneValue.Add("Drive can read and write DVD+MRW");
|
||||
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");
|
||||
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)
|
||||
mmcOneValue.Add("Drive can read HD DVD-ROM, HD DVD-RW and HD DVD-R");
|
||||
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");
|
||||
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(string.Format("{0} bytes per logical block", ftr.LogicalBlockSize));
|
||||
if(ftr.MultiRead)
|
||||
@@ -216,69 +159,47 @@ namespace DiscImageChef.Server.App_Start
|
||||
mmcOneValue.Add("Drive uses a vendor unique interface");
|
||||
break;
|
||||
default:
|
||||
mmcOneValue.Add(string.Format("Drive uses an unknown interface with code {0}", (uint)ftr.PhysicalInterfaceStandard));
|
||||
mmcOneValue.Add(string.Format("Drive uses an unknown interface with code {0}",
|
||||
(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)
|
||||
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:");
|
||||
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)
|
||||
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.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)
|
||||
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");
|
||||
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.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");
|
||||
@@ -295,8 +216,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
mmcOneValue.Add("Drive contains an embedded changer");
|
||||
|
||||
if(ftr.ChangerIsSideChangeCapable)
|
||||
mmcOneValue.Add("Drive can change disc side");
|
||||
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");
|
||||
|
||||
@@ -304,24 +224,17 @@ namespace DiscImageChef.Server.App_Start
|
||||
}
|
||||
if(ftr.SupportsCSS && ftr.CSSVersionSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive supports DVD CSS/CPPM version {0}", ftr.CSSVersion));
|
||||
else if(ftr.SupportsCSS)
|
||||
mmcOneValue.Add("Drive supports DVD CSS/CPRM");
|
||||
else if(ftr.SupportsCSS) mmcOneValue.Add("Drive supports DVD CSS/CPRM");
|
||||
if(ftr.SupportsCPRM && ftr.CPRMVersionSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive supports DVD CPPM version {0}", 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");
|
||||
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.FirmwareDateSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive firmware is dated {0}", 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.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");
|
||||
|
||||
switch(ftr.LoadingMechanismType)
|
||||
{
|
||||
@@ -341,26 +254,21 @@ namespace DiscImageChef.Server.App_Start
|
||||
mmcOneValue.Add("Drive is a changer using cartridges");
|
||||
break;
|
||||
default:
|
||||
mmcOneValue.Add(string.Format("Drive uses unknown loading mechanism type {0}", ftr.LoadingMechanismType));
|
||||
mmcOneValue.Add(string.Format("Drive uses unknown loading mechanism type {0}",
|
||||
ftr.LoadingMechanismType));
|
||||
break;
|
||||
}
|
||||
|
||||
if(ftr.SupportsHybridDiscs)
|
||||
mmcOneValue.Add("Drive is able to access Hybrid discs");
|
||||
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)
|
||||
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.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.VolumeLevelsSpecified)
|
||||
mmcOneValue.Add(string.Format("Drive has {0} volume levels", ftr.VolumeLevels + 1));
|
||||
if(ftr.SupportsWriteProtectPAC)
|
||||
@@ -372,4 +280,4 @@ namespace DiscImageChef.Server.App_Start
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,29 +39,19 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
public static void Report(mmcModeType mode, ref List<string> mmcOneValue)
|
||||
{
|
||||
if(mode.PlaysAudio)
|
||||
mmcOneValue.Add("Drive can play audio");
|
||||
if(mode.ReadsMode2Form1)
|
||||
mmcOneValue.Add("Drive can read sectors in Mode 2 Form 1 format");
|
||||
if(mode.ReadsMode2Form2)
|
||||
mmcOneValue.Add("Drive can read sectors in Mode 2 Form 2 format");
|
||||
if(mode.SupportsMultiSession)
|
||||
mmcOneValue.Add("Drive supports multi-session discs and/or Photo-CD");
|
||||
if(mode.PlaysAudio) mmcOneValue.Add("Drive can play audio");
|
||||
if(mode.ReadsMode2Form1) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 1 format");
|
||||
if(mode.ReadsMode2Form2) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 2 format");
|
||||
if(mode.SupportsMultiSession) 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.ReadsSubchannel)
|
||||
mmcOneValue.Add("Drive can read uncorrected and interleaved R-W subchannels");
|
||||
if(mode.CDDACommand) mmcOneValue.Add("Drive can read digital audio");
|
||||
if(mode.AccurateCDDA) mmcOneValue.Add("Drive can continue from streaming loss");
|
||||
if(mode.ReadsSubchannel) mmcOneValue.Add("Drive can read uncorrected and interleaved R-W subchannels");
|
||||
if(mode.ReadsDeinterlavedSubchannel)
|
||||
mmcOneValue.Add("Drive can read, deinterleave and correct R-W subchannels");
|
||||
if(mode.ReturnsC2Pointers)
|
||||
mmcOneValue.Add("Drive supports C2 pointers");
|
||||
if(mode.ReadsUPC)
|
||||
mmcOneValue.Add("Drive can read Media Catalogue Number");
|
||||
if(mode.ReadsISRC)
|
||||
mmcOneValue.Add("Drive can read ISRC");
|
||||
if(mode.ReturnsC2Pointers) mmcOneValue.Add("Drive supports C2 pointers");
|
||||
if(mode.ReadsUPC) mmcOneValue.Add("Drive can read Media Catalogue Number");
|
||||
if(mode.ReadsISRC) mmcOneValue.Add("Drive can read ISRC");
|
||||
|
||||
switch(mode.LoadingMechanismType)
|
||||
{
|
||||
@@ -81,39 +71,32 @@ namespace DiscImageChef.Server.App_Start
|
||||
mmcOneValue.Add("Drive is a changer using cartridges");
|
||||
break;
|
||||
default:
|
||||
mmcOneValue.Add(string.Format("Drive uses unknown loading mechanism type {0}", mode.LoadingMechanismType));
|
||||
mmcOneValue.Add(string.Format("Drive uses unknown loading mechanism type {0}",
|
||||
mode.LoadingMechanismType));
|
||||
break;
|
||||
}
|
||||
|
||||
if(mode.CanLockMedia)
|
||||
mmcOneValue.Add("Drive can lock media");
|
||||
if(mode.CanLockMedia) mmcOneValue.Add("Drive can lock media");
|
||||
if(mode.PreventJumperStatus)
|
||||
{
|
||||
mmcOneValue.Add("Drive power ups locked");
|
||||
if(mode.LockStatus)
|
||||
mmcOneValue.Add("Drive is locked, media cannot be ejected or inserted");
|
||||
else
|
||||
mmcOneValue.Add("Drive is not locked, media can be ejected and inserted");
|
||||
if(mode.LockStatus) mmcOneValue.Add("Drive is locked, media cannot be ejected or inserted");
|
||||
else mmcOneValue.Add("Drive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mode.LockStatus)
|
||||
mmcOneValue.Add("Drive is locked, media cannot be ejected, but if empty, can be inserted");
|
||||
else
|
||||
mmcOneValue.Add("Drive is not locked, media can be ejected and inserted");
|
||||
else mmcOneValue.Add("Drive is not locked, media can be ejected and inserted");
|
||||
}
|
||||
if(mode.CanEject)
|
||||
mmcOneValue.Add("Drive can eject media");
|
||||
if(mode.CanEject) 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)
|
||||
mmcOneValue.Add(string.Format("Drive supports {0} volume levels", mode.SupportedVolumeLevels));
|
||||
if(mode.BufferSize > 0)
|
||||
mmcOneValue.Add(string.Format("Drive has {0} Kbyte of buffer", mode.BufferSize));
|
||||
if(mode.BufferSize > 0) mmcOneValue.Add(string.Format("Drive has {0} Kbyte of buffer", mode.BufferSize));
|
||||
if(mode.MaximumSpeed > 0)
|
||||
mmcOneValue.Add(string.Format("Drive's maximum reading speed is {0} Kbyte/sec.", mode.MaximumSpeed));
|
||||
if(mode.CurrentSpeed > 0)
|
||||
@@ -121,97 +104,86 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if(mode.ReadsCDR)
|
||||
{
|
||||
if(mode.WritesCDR)
|
||||
mmcOneValue.Add("Drive can read and write CD-R");
|
||||
else
|
||||
mmcOneValue.Add("Drive can read CD-R");
|
||||
if(mode.WritesCDR) mmcOneValue.Add("Drive can read and write CD-R");
|
||||
else mmcOneValue.Add("Drive can read CD-R");
|
||||
|
||||
if(mode.ReadsPacketCDR)
|
||||
mmcOneValue.Add("Drive supports reading CD-R packet media");
|
||||
if(mode.ReadsPacketCDR) mmcOneValue.Add("Drive supports reading CD-R packet media");
|
||||
}
|
||||
|
||||
if(mode.ReadsCDRW)
|
||||
{
|
||||
if(mode.WritesCDRW)
|
||||
mmcOneValue.Add("Drive can read and write CD-RW");
|
||||
else
|
||||
mmcOneValue.Add("Drive can read CD-RW");
|
||||
if(mode.WritesCDRW) mmcOneValue.Add("Drive can read and write CD-RW");
|
||||
else mmcOneValue.Add("Drive can read CD-RW");
|
||||
}
|
||||
|
||||
if(mode.ReadsDVDROM)
|
||||
mmcOneValue.Add("Drive can read DVD-ROM");
|
||||
if(mode.ReadsDVDROM) mmcOneValue.Add("Drive can read DVD-ROM");
|
||||
if(mode.ReadsDVDR)
|
||||
{
|
||||
if(mode.WritesDVDR)
|
||||
mmcOneValue.Add("Drive can read and write DVD-R");
|
||||
else
|
||||
mmcOneValue.Add("Drive can read DVD-R");
|
||||
if(mode.WritesDVDR) mmcOneValue.Add("Drive can read and write DVD-R");
|
||||
else mmcOneValue.Add("Drive can read DVD-R");
|
||||
}
|
||||
if(mode.ReadsDVDRAM)
|
||||
{
|
||||
if(mode.WritesDVDRAM)
|
||||
mmcOneValue.Add("Drive can read and write DVD-RAM");
|
||||
else
|
||||
mmcOneValue.Add("Drive can read DVD-RAM");
|
||||
if(mode.WritesDVDRAM) mmcOneValue.Add("Drive can read and write DVD-RAM");
|
||||
else mmcOneValue.Add("Drive can read DVD-RAM");
|
||||
}
|
||||
|
||||
if(mode.CompositeAudioVideo)
|
||||
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.CompositeAudioVideo) 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.DeterministicSlotChanger)
|
||||
mmcOneValue.Add("Drive contains a changer that can report the exact contents of the slots");
|
||||
if(mode.CurrentWriteSpeedSelected > 0)
|
||||
{
|
||||
if(mode.RotationControlSelected == 0)
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec. in CLV mode", mode.CurrentWriteSpeedSelected));
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec. in CLV mode",
|
||||
mode.CurrentWriteSpeedSelected));
|
||||
else if(mode.RotationControlSelected == 1)
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec. in pure CAV mode", mode.CurrentWriteSpeedSelected));
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec. in pure CAV mode",
|
||||
mode.CurrentWriteSpeedSelected));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mode.MaximumWriteSpeed > 0)
|
||||
mmcOneValue.Add(string.Format("Drive's maximum writing speed is {0} Kbyte/sec.", mode.MaximumWriteSpeed));
|
||||
mmcOneValue.Add(string.Format("Drive's maximum writing speed is {0} Kbyte/sec.",
|
||||
mode.MaximumWriteSpeed));
|
||||
if(mode.CurrentWriteSpeed > 0)
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec.", mode.CurrentWriteSpeed));
|
||||
mmcOneValue.Add(string.Format("Drive's current writing speed is {0} Kbyte/sec.",
|
||||
mode.CurrentWriteSpeed));
|
||||
}
|
||||
|
||||
if(mode.WriteSpeedPerformanceDescriptors != null)
|
||||
{
|
||||
foreach(Decoders.SCSI.Modes.ModePage_2A_WriteDescriptor descriptor in mode.WriteSpeedPerformanceDescriptors)
|
||||
foreach(Decoders.SCSI.Modes.ModePage_2A_WriteDescriptor descriptor in
|
||||
mode.WriteSpeedPerformanceDescriptors)
|
||||
{
|
||||
if(descriptor.WriteSpeed > 0)
|
||||
{
|
||||
if(descriptor.RotationControl == 0)
|
||||
mmcOneValue.Add(string.Format("Drive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed));
|
||||
mmcOneValue.Add(string.Format("Drive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||
descriptor.WriteSpeed));
|
||||
else if(descriptor.RotationControl == 1)
|
||||
mmcOneValue.Add(string.Format("Drive supports writing at is {0} Kbyte/sec. in pure CAV mode", descriptor.WriteSpeed));
|
||||
mmcOneValue
|
||||
.Add(string.Format("Drive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||
descriptor.WriteSpeed));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mode.TestWrite)
|
||||
mmcOneValue.Add("Drive supports test writing");
|
||||
if(mode.TestWrite) mmcOneValue.Add("Drive supports test writing");
|
||||
|
||||
if(mode.ReadsBarcode)
|
||||
mmcOneValue.Add("Drive can read barcode");
|
||||
if(mode.ReadsBarcode) mmcOneValue.Add("Drive can read barcode");
|
||||
|
||||
if(mode.ReadsBothSides)
|
||||
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.ReadsBothSides) 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.CSSandCPPMSupported)
|
||||
mmcOneValue.Add("Drive supports DVD CSS and/or DVD CPPM");
|
||||
if(mode.CSSandCPPMSupported) mmcOneValue.Add("Drive supports DVD CSS and/or DVD CPPM");
|
||||
|
||||
if(mode.BufferUnderRunProtection)
|
||||
mmcOneValue.Add("Drive supports buffer under-run free recording");
|
||||
if(mode.BufferUnderRunProtection) mmcOneValue.Add("Drive supports buffer under-run free recording");
|
||||
|
||||
mmcOneValue.Sort();
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,12 +38,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
public static class ScsiModeSense
|
||||
{
|
||||
public static void Report(modeType modeSense, string vendor, PeripheralDeviceTypes deviceType, ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
||||
public static void Report(modeType modeSense, string vendor, PeripheralDeviceTypes deviceType,
|
||||
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
||||
{
|
||||
if(modeSense.MediumTypeSpecified)
|
||||
scsiOneValue.Add(string.Format("Medium type is {0:X2}h", modeSense.MediumType));
|
||||
if(modeSense.WriteProtected)
|
||||
scsiOneValue.Add("Device is write protected.");
|
||||
if(modeSense.WriteProtected) scsiOneValue.Add("Device is write protected.");
|
||||
if(modeSense.BlockDescriptors != null)
|
||||
{
|
||||
foreach(blockDescriptorType descriptor in modeSense.BlockDescriptors)
|
||||
@@ -51,14 +51,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(descriptor.BlocksSpecified && descriptor.BlockLengthSpecified)
|
||||
scsiOneValue.Add(string.Format("Density code {0:X2}h has {1} blocks of {2} bytes each",
|
||||
descriptor.Density, descriptor.Blocks, descriptor.BlockLength));
|
||||
else
|
||||
scsiOneValue.Add(string.Format("Density code {0:X2}h", descriptor.Density));
|
||||
else scsiOneValue.Add(string.Format("Density code {0:X2}h", descriptor.Density));
|
||||
}
|
||||
}
|
||||
if(modeSense.DPOandFUA)
|
||||
scsiOneValue.Add("Drive supports DPO and FUA bits");
|
||||
if(modeSense.BlankCheckEnabled)
|
||||
scsiOneValue.Add("Blank checking during write is enabled");
|
||||
|
||||
if(modeSense.DPOandFUA) scsiOneValue.Add("Drive supports DPO and FUA bits");
|
||||
if(modeSense.BlankCheckEnabled) scsiOneValue.Add("Blank checking during write is enabled");
|
||||
if(modeSense.BufferedModeSpecified)
|
||||
{
|
||||
switch(modeSense.BufferedMode)
|
||||
@@ -85,327 +83,340 @@ namespace DiscImageChef.Server.App_Start
|
||||
switch(page.page)
|
||||
{
|
||||
case 0x00:
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice && page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_00_SFF(page.value));
|
||||
else
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice && page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_00_SFF(page.value));
|
||||
if(page.subpage != 0)
|
||||
modePages
|
||||
.Add(string.Format("MODE page {0:X2}h subpage {1:X2}h", page.page, page.subpage),
|
||||
"Unknown vendor mode page");
|
||||
else
|
||||
{
|
||||
if(page.subpage != 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h subpage {1:X2}h", page.page, page.subpage), "Unknown vendor mode page");
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), "Unknown vendor mode page");
|
||||
}
|
||||
break;
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
"Unknown vendor mode page");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x01:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_01_MMC(page.value));
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_01(page.value));
|
||||
}
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_01_MMC(page.value));
|
||||
else
|
||||
goto default;
|
||||
|
||||
break;
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_01(page.value));
|
||||
}
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x02:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_02(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_02(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x03:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_03(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_03(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x04:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_04(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_04(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x05:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_05(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_05(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x06:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_06(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_06(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x07:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_07_MMC(page.value));
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_07(page.value));
|
||||
}
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_07_MMC(page.value));
|
||||
else
|
||||
goto default;
|
||||
|
||||
break;
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_07(page.value));
|
||||
}
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x08:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_08(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_08(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0A_S01(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0A_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0B:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0B(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0B(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0D:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0D(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0D(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0E:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0E(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0E(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x0F:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_0F(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_0F(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x10:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(deviceType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_10_SSC(page.value));
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_10(page.value));
|
||||
}
|
||||
if(deviceType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_10_SSC(page.value));
|
||||
else
|
||||
goto default;
|
||||
|
||||
break;
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_10(page.value));
|
||||
}
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x11:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_11(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_11(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x12:
|
||||
case 0x13:
|
||||
case 0x14:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_12_13_14(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_12_13_14(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x1A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1A_S01(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1A(page.value));
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1A_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x1B:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1B(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1B(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x1C:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
{
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1C_SFF(page.value));
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1C(page.value));
|
||||
}
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1C_S01(page.value));
|
||||
if(deviceType == PeripheralDeviceTypes.MultiMediaDevice)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1C_SFF(page.value));
|
||||
else
|
||||
goto default;
|
||||
|
||||
break;
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1C(page.value));
|
||||
}
|
||||
else if(page.subpage == 1)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1C_S01(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x1D:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_1D(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_1D(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x21:
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyCertanceModePage_21(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyCertanceModePage_21(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x22:
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyCertanceModePage_22(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "CERTANCE")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyCertanceModePage_22(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x24:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyIBMModePage_24(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyIBMModePage_24(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x2A:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyModePage_2A(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_2A(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x2F:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyIBMModePage_2F(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyIBMModePage_2F(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x30:
|
||||
{
|
||||
if(Modes.IsAppleModePage_30(page.value))
|
||||
modePages.Add("MODE page 30h", "Drive identifies as an Apple OEM drive");
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(Modes.IsAppleModePage_30(page.value))
|
||||
modePages.Add("MODE page 30h", "Drive identifies as an Apple OEM drive");
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x3B:
|
||||
{
|
||||
if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyHPModePage_3B(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyHPModePage_3B(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x3C:
|
||||
{
|
||||
if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyHPModePage_3C(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyHPModePage_3C(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x3D:
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyIBMModePage_3D(page.value));
|
||||
else if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyHPModePage_3D(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "IBM")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyIBMModePage_3D(page.value));
|
||||
else if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyHPModePage_3D(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x3E:
|
||||
{
|
||||
if(vendor == "FUJITSU")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyFujitsuModePage_3E(page.value));
|
||||
else if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), Modes.PrettifyHPModePage_3E(page.value));
|
||||
else
|
||||
goto default;
|
||||
{
|
||||
if(vendor == "FUJITSU")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyFujitsuModePage_3E(page.value));
|
||||
else if(vendor == "HP")
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyHPModePage_3E(page.value));
|
||||
else goto default;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
if(page.subpage != 0)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h subpage {1:X2}h", page.page, page.subpage), "Unknown mode page");
|
||||
else
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page), "Unknown mode page");
|
||||
}
|
||||
{
|
||||
if(page.subpage != 0)
|
||||
modePages
|
||||
.Add(string.Format("MODE page {0:X2}h subpage {1:X2}h", page.page, page.subpage),
|
||||
"Unknown mode page");
|
||||
else modePages.Add(string.Format("MODE page {0:X2}h", page.page), "Unknown mode page");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -413,13 +424,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
Dictionary<string, string> newModePages = new Dictionary<string, string>();
|
||||
foreach(KeyValuePair<string, string> kvp in modePages)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(kvp.Value))
|
||||
newModePages.Add(kvp.Key, "Undecoded");
|
||||
else
|
||||
newModePages.Add(kvp.Key, kvp.Value.Replace("\n", "<br/>"));
|
||||
if(string.IsNullOrWhiteSpace(kvp.Value)) newModePages.Add(kvp.Key, "Undecoded");
|
||||
else newModePages.Add(kvp.Key, kvp.Value.Replace("\n", "<br/>"));
|
||||
}
|
||||
|
||||
modePages = newModePages;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,14 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
||||
{
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium named \"{0}\"</i>", media.MediumTypeName));
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium named \"{0}\"</i>",
|
||||
media.MediumTypeName));
|
||||
if(media.MediumTypeSpecified)
|
||||
mediaOneValue.Add(string.Format("Medium type code: {0:X2}h", media.MediumType));
|
||||
}
|
||||
else if(media.MediumTypeSpecified)
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium type {0:X2}h</i>", media.MediumType));
|
||||
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))
|
||||
mediaOneValue.Add(string.Format("Medium manufactured by: {0}", media.Manufacturer));
|
||||
@@ -59,13 +59,11 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if(media.DensitySpecified)
|
||||
mediaOneValue.Add(string.Format("Medium has density code {0:X2}h", media.Density));
|
||||
if(media.CanReadMediaSerial)
|
||||
mediaOneValue.Add("Drive can read medium serial number.");
|
||||
if(media.MediaIsRecognized)
|
||||
mediaOneValue.Add("DiscImageChef recognizes this medium.");
|
||||
if(media.CanReadMediaSerial) mediaOneValue.Add("Drive can read medium serial number.");
|
||||
if(media.MediaIsRecognized) mediaOneValue.Add("DiscImageChef recognizes this medium.");
|
||||
|
||||
mediaOneValue.Add("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,20 +43,19 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.MediumTypeName))
|
||||
{
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium named \"{0}\"</i>", testedMedia.MediumTypeName));
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium named \"{0}\"</i>",
|
||||
testedMedia.MediumTypeName));
|
||||
if(testedMedia.MediumTypeSpecified)
|
||||
mediaOneValue.Add(string.Format("Medium type code: {0:X2}h", testedMedia.MediumType));
|
||||
}
|
||||
else if(testedMedia.MediumTypeSpecified)
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium type {0:X2}h</i>", testedMedia.MediumType));
|
||||
else
|
||||
mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
mediaOneValue.Add(string.Format("<i>Information for medium type {0:X2}h</i>",
|
||||
testedMedia.MediumType));
|
||||
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||
|
||||
if(testedMedia.MediaIsRecognized) mediaOneValue.Add("Drive recognizes this medium.");
|
||||
else mediaOneValue.Add("Drive does not recognize this medium.");
|
||||
|
||||
if(testedMedia.MediaIsRecognized)
|
||||
mediaOneValue.Add("Drive recognizes this medium.");
|
||||
else
|
||||
mediaOneValue.Add("Drive does not recognize this medium.");
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.Manufacturer))
|
||||
mediaOneValue.Add(string.Format("Medium manufactured by: {0}", testedMedia.Manufacturer));
|
||||
if(!string.IsNullOrWhiteSpace(testedMedia.Model))
|
||||
@@ -73,35 +72,55 @@ namespace DiscImageChef.Server.App_Start
|
||||
|
||||
if(testedMedia.BlocksSpecified && testedMedia.BlockSizeSpecified)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium has {0} blocks of {1} bytes each", testedMedia.Blocks, testedMedia.BlockSize));
|
||||
mediaOneValue.Add(string.Format("Medium has {0} blocks of {1} bytes each", testedMedia.Blocks,
|
||||
testedMedia.BlockSize));
|
||||
|
||||
if(((testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024) > 1000000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Tb, {2:F2} TiB", testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000 / 1000 / 1000, (double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Tb, {2:F2} TiB",
|
||||
testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000 /
|
||||
1000 / 1000,
|
||||
(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 /
|
||||
1024 / 1024 / 1024));
|
||||
}
|
||||
else if(((testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024) > 1000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Gb, {2:F2} GiB", testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000 / 1000, (double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Gb, {2:F2} GiB",
|
||||
testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000 /
|
||||
1000,
|
||||
(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 /
|
||||
1024 / 1024));
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Mb, {2:F2} MiB", testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000, (double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
testedMedia.Blocks * testedMedia.BlockSize,
|
||||
(testedMedia.Blocks * testedMedia.BlockSize) / 1000 / 1000,
|
||||
(double)(testedMedia.Blocks * testedMedia.BlockSize) / 1024 /
|
||||
1024));
|
||||
}
|
||||
}
|
||||
|
||||
if(testedMedia.CHS != null && testedMedia.CurrentCHS != null)
|
||||
{
|
||||
int currentSectors = testedMedia.CurrentCHS.Cylinders * testedMedia.CurrentCHS.Heads * testedMedia.CurrentCHS.Sectors;
|
||||
mediaOneValue.Add(string.Format("Cylinders: {0} max., {1} current", testedMedia.CHS.Cylinders, testedMedia.CurrentCHS.Cylinders));
|
||||
mediaOneValue.Add(string.Format("Heads: {0} max., {1} current", testedMedia.CHS.Heads, testedMedia.CurrentCHS.Heads));
|
||||
mediaOneValue.Add(string.Format("Sectors per track: {0} max., {1} current", testedMedia.CHS.Sectors, testedMedia.CurrentCHS.Sectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in CHS mode: {0} max., {1} current", testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors,
|
||||
currentSectors));
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000, (double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
int currentSectors = testedMedia.CurrentCHS.Cylinders * testedMedia.CurrentCHS.Heads *
|
||||
testedMedia.CurrentCHS.Sectors;
|
||||
mediaOneValue.Add(string.Format("Cylinders: {0} max., {1} current", testedMedia.CHS.Cylinders,
|
||||
testedMedia.CurrentCHS.Cylinders));
|
||||
mediaOneValue.Add(string.Format("Heads: {0} max., {1} current", testedMedia.CHS.Heads,
|
||||
testedMedia.CurrentCHS.Heads));
|
||||
mediaOneValue.Add(string.Format("Sectors per track: {0} max., {1} current", testedMedia.CHS.Sectors,
|
||||
testedMedia.CurrentCHS.Sectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in CHS mode: {0} max., {1} current",
|
||||
testedMedia.CHS.Cylinders * testedMedia.CHS.Heads *
|
||||
testedMedia.CHS.Sectors, currentSectors));
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
(ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000,
|
||||
(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 /
|
||||
1024));
|
||||
}
|
||||
else if(testedMedia.CHS != null)
|
||||
{
|
||||
@@ -110,73 +129,99 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add(string.Format("Heads: {0}", testedMedia.CHS.Heads));
|
||||
mediaOneValue.Add(string.Format("Sectors per track: {0}", testedMedia.CHS.Sectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in CHS mode: {0}", currentSectors));
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000, (double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
(ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000,
|
||||
(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 /
|
||||
1024));
|
||||
}
|
||||
|
||||
if(testedMedia.LBASectorsSpecified)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in sectors in 28-bit LBA mode: {0}", testedMedia.LBASectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in sectors in 28-bit LBA mode: {0}",
|
||||
testedMedia.LBASectors));
|
||||
|
||||
if((((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024) > 1000000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Tb, {2:F2} TiB", (ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 / 1000 / 1000 / 1000, (double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Tb, {2:F2} TiB",
|
||||
(ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 /
|
||||
1000 / 1000 / 1000,
|
||||
(double)((ulong)testedMedia.LBASectors *
|
||||
testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024));
|
||||
}
|
||||
else if((((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024) > 1000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Gb, {2:F2} GiB", (ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 / 1000 / 1000, (double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Gb, {2:F2} GiB",
|
||||
(ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 /
|
||||
1000 / 1000,
|
||||
(double)((ulong)testedMedia.LBASectors *
|
||||
testedMedia.BlockSize) / 1024 / 1024 / 1024));
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Mb, {2:F2} MiB", (ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 / 1000, (double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 28-bit LBA mode: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
(ulong)testedMedia.LBASectors * testedMedia.BlockSize,
|
||||
((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1000 /
|
||||
1000,
|
||||
(double)((ulong)testedMedia.LBASectors *
|
||||
testedMedia.BlockSize) / 1024 / 1024));
|
||||
}
|
||||
}
|
||||
|
||||
if(testedMedia.LBA48SectorsSpecified)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in sectors in 48-bit LBA mode: {0}", testedMedia.LBA48Sectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in sectors in 48-bit LBA mode: {0}",
|
||||
testedMedia.LBA48Sectors));
|
||||
|
||||
if(((testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024) > 1000000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Tb, {2:F2} TiB", testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 / 1000 / 1000 / 1000, (double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Tb, {2:F2} TiB",
|
||||
testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 /
|
||||
1000 / 1000 / 1000,
|
||||
(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) /
|
||||
1024 / 1024 / 1024 / 1024));
|
||||
}
|
||||
else if(((testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024) > 1000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Gb, {2:F2} GiB", testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 / 1000 / 1000, (double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Gb, {2:F2} GiB",
|
||||
testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 /
|
||||
1000 / 1000,
|
||||
(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) /
|
||||
1024 / 1024 / 1024));
|
||||
}
|
||||
else
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Mb, {2:F2} MiB", testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 / 1000, (double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
mediaOneValue.Add(string.Format("Medium size in 48-bit LBA mode: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
testedMedia.LBA48Sectors * testedMedia.BlockSize,
|
||||
(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1000 /
|
||||
1000,
|
||||
(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) /
|
||||
1024 / 1024));
|
||||
}
|
||||
}
|
||||
|
||||
if(testedMedia.NominalRotationRateSpecified &&
|
||||
testedMedia.NominalRotationRate != 0x0000 &&
|
||||
if(testedMedia.NominalRotationRateSpecified && testedMedia.NominalRotationRate != 0x0000 &&
|
||||
testedMedia.NominalRotationRate != 0xFFFF)
|
||||
{
|
||||
if(testedMedia.NominalRotationRate == 0x0001)
|
||||
mediaOneValue.Add("Medium does not rotate.");
|
||||
else
|
||||
mediaOneValue.Add(string.Format("Medium rotates at {0} rpm", testedMedia.NominalRotationRate));
|
||||
if(testedMedia.NominalRotationRate == 0x0001) mediaOneValue.Add("Medium does not rotate.");
|
||||
else mediaOneValue.Add(string.Format("Medium rotates at {0} rpm", testedMedia.NominalRotationRate));
|
||||
}
|
||||
|
||||
if(testedMedia.BlockSizeSpecified &&
|
||||
testedMedia.PhysicalBlockSizeSpecified &&
|
||||
if(testedMedia.BlockSizeSpecified && testedMedia.PhysicalBlockSizeSpecified &&
|
||||
(testedMedia.BlockSize != testedMedia.PhysicalBlockSize) &&
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||
{
|
||||
mediaOneValue.Add(string.Format("Logical sector starts at offset {0} from physical sector", testedMedia.LogicalAlignment & 0x3FFF));
|
||||
mediaOneValue.Add(string.Format("Logical sector starts at offset {0} from physical sector",
|
||||
testedMedia.LogicalAlignment & 0x3FFF));
|
||||
}
|
||||
|
||||
if(testedMedia.SupportsRead && ata)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in CHS mode with this medium");
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadRetry)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) RETRY command in CHS mode with this medium");
|
||||
if(testedMedia.SupportsReadDma)
|
||||
@@ -191,7 +236,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(testedMedia.SupportsReadLba)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadRetryLba)
|
||||
mediaOneValue.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaLba)
|
||||
mediaOneValue.Add("Device can use the READ DMA command in 28-bit LBA mode with this medium");
|
||||
if(testedMedia.SupportsReadDmaRetryLba)
|
||||
@@ -233,9 +279,11 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(testedMedia.SupportsReadCdMsf)
|
||||
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium");
|
||||
if(testedMedia.SupportsReadCdRaw)
|
||||
mediaOneValue.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||
if(testedMedia.SupportsReadCdMsfRaw)
|
||||
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
mediaOneValue
|
||||
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||
|
||||
if(testedMedia.SupportsHLDTSTReadRawDVD)
|
||||
mediaOneValue.Add("Device can use the HL-DT-ST vendor READ DVD (RAW) command with this medium");
|
||||
@@ -256,8 +304,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can read the DVD ADress-In-Pregroove from this medium");
|
||||
if(testedMedia.CanReadATIP)
|
||||
mediaOneValue.Add("Device can read the CD Absolute-Time-In-Pregroove from this medium");
|
||||
if(testedMedia.CanReadBCA)
|
||||
mediaOneValue.Add("Device can read the Burst Cutting Area from this medium");
|
||||
if(testedMedia.CanReadBCA) mediaOneValue.Add("Device can read the Burst Cutting Area from this medium");
|
||||
if(testedMedia.CanReadC2Pointers)
|
||||
mediaOneValue.Add("Device can report the C2 pointers when reading from this medium");
|
||||
if(testedMedia.CanReadCMI)
|
||||
@@ -265,7 +312,8 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(testedMedia.CanReadCorrectedSubchannel)
|
||||
mediaOneValue.Add("Device can correct subchannels when reading from this medium");
|
||||
if(testedMedia.CanReadCorrectedSubchannelWithC2)
|
||||
mediaOneValue.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
mediaOneValue
|
||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||
if(testedMedia.CanReadDCB)
|
||||
mediaOneValue.Add("Device can read the Disc Control Blocks from this medium");
|
||||
if(testedMedia.CanReadDDS)
|
||||
@@ -280,16 +328,12 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add("Device can read the HD DVD Copyright Management Information from this medium");
|
||||
if(testedMedia.CanReadLayerCapacity)
|
||||
mediaOneValue.Add("Device can read the layer capacity from this medium");
|
||||
if(testedMedia.CanReadLeadIn)
|
||||
mediaOneValue.Add("Device can read the Lead-In from this medium");
|
||||
if(testedMedia.CanReadLeadOut)
|
||||
mediaOneValue.Add("Device can read the Lead-Out from this medium");
|
||||
if(testedMedia.CanReadMediaID)
|
||||
mediaOneValue.Add("Device can read the Media ID from this medium");
|
||||
if(testedMedia.CanReadLeadIn) mediaOneValue.Add("Device can read the Lead-In from this medium");
|
||||
if(testedMedia.CanReadLeadOut) mediaOneValue.Add("Device can read the Lead-Out from this medium");
|
||||
if(testedMedia.CanReadMediaID) mediaOneValue.Add("Device can read the Media ID from this medium");
|
||||
if(testedMedia.CanReadMediaSerial)
|
||||
mediaOneValue.Add("Device can read the Media Serial Number from this medium");
|
||||
if(testedMedia.CanReadPAC)
|
||||
mediaOneValue.Add("Device can read the PAC from this medium");
|
||||
if(testedMedia.CanReadPAC) mediaOneValue.Add("Device can read the PAC from this medium");
|
||||
if(testedMedia.CanReadPFI)
|
||||
mediaOneValue.Add("Device can read the Physical Format Information from this medium");
|
||||
if(testedMedia.CanReadPMA)
|
||||
@@ -297,22 +341,23 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(testedMedia.CanReadPQSubchannel)
|
||||
mediaOneValue.Add("Device can read the P to Q subchannels from this medium");
|
||||
if(testedMedia.CanReadPQSubchannelWithC2)
|
||||
mediaOneValue.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
mediaOneValue
|
||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadPRI)
|
||||
mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium");
|
||||
if(testedMedia.CanReadRWSubchannel)
|
||||
mediaOneValue.Add("Device can read the R to W subchannels from this medium");
|
||||
if(testedMedia.CanReadRWSubchannelWithC2)
|
||||
mediaOneValue.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
mediaOneValue
|
||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||
if(testedMedia.CanReadRecordablePFI)
|
||||
mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium");
|
||||
if(testedMedia.CanReadSpareAreaInformation)
|
||||
mediaOneValue.Add("Device can read the Spare Area Information from this medium");
|
||||
if(testedMedia.CanReadTOC)
|
||||
mediaOneValue.Add("Device can read the Table of Contents from this medium");
|
||||
if(testedMedia.CanReadTOC) mediaOneValue.Add("Device can read the Table of Contents from this medium");
|
||||
|
||||
mediaOneValue.Add("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,11 +43,8 @@ namespace DiscImageChef.Server
|
||||
// Web API routes
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "DefaultApi",
|
||||
routeTemplate: "api/{controller}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
config.Routes.MapHttpRoute(name: "DefaultApi", routeTemplate: "api/{controller}/{id}",
|
||||
defaults: new {id = RouteParameter.Optional});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,16 +36,16 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef's TODO</title>
|
||||
</head>
|
||||
<body id="body" runat="server">
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of changes:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" runat="server" Path="~/docs/Changelog.md" />
|
||||
</div>
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of changes:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" Path="~/docs/Changelog.md" runat="server"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -76,7 +76,9 @@ namespace DiscImageChef.Server.Controllers
|
||||
filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
}
|
||||
|
||||
FileStream newFile = new FileStream(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Upload", filename), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
FileStream newFile =
|
||||
new FileStream(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Upload", filename),
|
||||
FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
xs.Serialize(newFile, newReport);
|
||||
newFile.Close();
|
||||
|
||||
@@ -94,4 +96,4 @@ namespace DiscImageChef.Server.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,9 @@ namespace DiscImageChef.Server.Controllers
|
||||
return response;
|
||||
}
|
||||
|
||||
FileStream fs = WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
|
||||
FileStream fs =
|
||||
WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
FileMode.Open, FileAccess.ReadWrite, FileShare.None);
|
||||
|
||||
if(fs == null)
|
||||
{
|
||||
@@ -84,8 +86,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(newStats.Commands != null)
|
||||
{
|
||||
if(oldStats.Commands == null)
|
||||
oldStats.Commands = newStats.Commands;
|
||||
if(oldStats.Commands == null) oldStats.Commands = newStats.Commands;
|
||||
else
|
||||
{
|
||||
oldStats.Commands.Analyze += newStats.Commands.Analyze;
|
||||
@@ -112,8 +113,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(newStats.OperatingSystems != null)
|
||||
{
|
||||
if(oldStats.OperatingSystems == null)
|
||||
oldStats.OperatingSystems = newStats.OperatingSystems;
|
||||
if(oldStats.OperatingSystems == null) oldStats.OperatingSystems = newStats.OperatingSystems;
|
||||
else
|
||||
{
|
||||
foreach(OsStats newNvs in newStats.OperatingSystems)
|
||||
@@ -125,7 +125,12 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name && oldNvs.version == newNvs.version)
|
||||
{
|
||||
addNvs = new OsStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value, version = oldNvs.version };
|
||||
addNvs = new OsStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value,
|
||||
version = oldNvs.version
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -136,18 +141,15 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.OperatingSystems.Remove(removeNvs);
|
||||
oldStats.OperatingSystems.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.OperatingSystems.Add(newNvs);
|
||||
else oldStats.OperatingSystems.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(oldStats.OperatingSystems == null)
|
||||
oldStats.OperatingSystems = new System.Collections.Generic.List<OsStats>
|
||||
{
|
||||
new OsStats { name = "Linux", Value = 1 }
|
||||
};
|
||||
oldStats.OperatingSystems =
|
||||
new System.Collections.Generic.List<OsStats> {new OsStats {name = "Linux", Value = 1}};
|
||||
else
|
||||
{
|
||||
OsStats removeNvs = null;
|
||||
@@ -157,7 +159,12 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == "Linux")
|
||||
{
|
||||
addNvs = new OsStats { name = oldNvs.name, Value = oldNvs.Value + 1, version = oldNvs.version };
|
||||
addNvs = new OsStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + 1,
|
||||
version = oldNvs.version
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -168,15 +175,13 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.OperatingSystems.Remove(removeNvs);
|
||||
oldStats.OperatingSystems.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.OperatingSystems.Add(new OsStats { name = "Linux", Value = 1 });
|
||||
else oldStats.OperatingSystems.Add(new OsStats {name = "Linux", Value = 1});
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Versions != null)
|
||||
{
|
||||
if(oldStats.Versions == null)
|
||||
oldStats.Versions = newStats.Versions;
|
||||
if(oldStats.Versions == null) oldStats.Versions = newStats.Versions;
|
||||
else
|
||||
{
|
||||
foreach(NameValueStats newNvs in newStats.Versions)
|
||||
@@ -188,7 +193,11 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name)
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value };
|
||||
addNvs = new NameValueStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -199,18 +208,18 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Versions.Remove(removeNvs);
|
||||
oldStats.Versions.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.Versions.Add(newNvs);
|
||||
else oldStats.Versions.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(oldStats.Versions == null)
|
||||
oldStats.Versions = new System.Collections.Generic.List<NameValueStats>
|
||||
{
|
||||
new NameValueStats { name = "previous", Value = 1 }
|
||||
};
|
||||
oldStats.Versions =
|
||||
new System.Collections.Generic.List<NameValueStats>
|
||||
{
|
||||
new NameValueStats {name = "previous", Value = 1}
|
||||
};
|
||||
else
|
||||
{
|
||||
NameValueStats removeNvs = null;
|
||||
@@ -220,7 +229,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == "previous")
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + 1 };
|
||||
addNvs = new NameValueStats {name = oldNvs.name, Value = oldNvs.Value + 1};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -231,15 +240,13 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Versions.Remove(removeNvs);
|
||||
oldStats.Versions.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.Versions.Add(new NameValueStats { name = "previous", Value = 1 });
|
||||
else oldStats.Versions.Add(new NameValueStats {name = "previous", Value = 1});
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Filesystems != null)
|
||||
{
|
||||
if(oldStats.Filesystems == null)
|
||||
oldStats.Filesystems = newStats.Filesystems;
|
||||
if(oldStats.Filesystems == null) oldStats.Filesystems = newStats.Filesystems;
|
||||
else
|
||||
{
|
||||
foreach(NameValueStats newNvs in newStats.Filesystems)
|
||||
@@ -251,7 +258,11 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name)
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value };
|
||||
addNvs = new NameValueStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -262,16 +273,14 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Filesystems.Remove(removeNvs);
|
||||
oldStats.Filesystems.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.Filesystems.Add(newNvs);
|
||||
else oldStats.Filesystems.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Partitions != null)
|
||||
{
|
||||
if(oldStats.Partitions == null)
|
||||
oldStats.Partitions = newStats.Partitions;
|
||||
if(oldStats.Partitions == null) oldStats.Partitions = newStats.Partitions;
|
||||
else
|
||||
{
|
||||
foreach(NameValueStats newNvs in newStats.Partitions)
|
||||
@@ -283,7 +292,11 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name)
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value };
|
||||
addNvs = new NameValueStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -294,16 +307,14 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Partitions.Remove(removeNvs);
|
||||
oldStats.Partitions.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.Partitions.Add(newNvs);
|
||||
else oldStats.Partitions.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.MediaImages != null)
|
||||
{
|
||||
if(oldStats.MediaImages == null)
|
||||
oldStats.MediaImages = newStats.MediaImages;
|
||||
if(oldStats.MediaImages == null) oldStats.MediaImages = newStats.MediaImages;
|
||||
else
|
||||
{
|
||||
foreach(NameValueStats newNvs in newStats.MediaImages)
|
||||
@@ -315,7 +326,11 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name)
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value };
|
||||
addNvs = new NameValueStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -326,16 +341,14 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.MediaImages.Remove(removeNvs);
|
||||
oldStats.MediaImages.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.MediaImages.Add(newNvs);
|
||||
else oldStats.MediaImages.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Filters != null)
|
||||
{
|
||||
if(oldStats.Filters == null)
|
||||
oldStats.Filters = newStats.Filters;
|
||||
if(oldStats.Filters == null) oldStats.Filters = newStats.Filters;
|
||||
else
|
||||
{
|
||||
foreach(NameValueStats newNvs in newStats.Filters)
|
||||
@@ -347,7 +360,11 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldNvs.name == newNvs.name)
|
||||
{
|
||||
addNvs = new NameValueStats { name = oldNvs.name, Value = oldNvs.Value + newNvs.Value };
|
||||
addNvs = new NameValueStats
|
||||
{
|
||||
name = oldNvs.name,
|
||||
Value = oldNvs.Value + newNvs.Value
|
||||
};
|
||||
removeNvs = oldNvs;
|
||||
break;
|
||||
}
|
||||
@@ -358,16 +375,14 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Filters.Remove(removeNvs);
|
||||
oldStats.Filters.Add(addNvs);
|
||||
}
|
||||
else
|
||||
oldStats.Filters.Add(newNvs);
|
||||
else oldStats.Filters.Add(newNvs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Devices != null)
|
||||
{
|
||||
if(oldStats.Devices == null)
|
||||
oldStats.Devices = newStats.Devices;
|
||||
if(oldStats.Devices == null) oldStats.Devices = newStats.Devices;
|
||||
else
|
||||
{
|
||||
foreach(DeviceStats newDev in newStats.Devices)
|
||||
@@ -376,26 +391,22 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
foreach(DeviceStats oldDev in oldStats.Devices)
|
||||
{
|
||||
if(oldDev.Manufacturer == newDev.Manufacturer &&
|
||||
oldDev.Model == newDev.Model &&
|
||||
oldDev.Revision == newDev.Revision &&
|
||||
oldDev.Bus == newDev.Bus)
|
||||
if(oldDev.Manufacturer == newDev.Manufacturer && oldDev.Model == newDev.Model &&
|
||||
oldDev.Revision == newDev.Revision && oldDev.Bus == newDev.Bus)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found)
|
||||
oldStats.Devices.Add(newDev);
|
||||
if(!found) oldStats.Devices.Add(newDev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.Medias != null)
|
||||
{
|
||||
if(oldStats.Medias == null)
|
||||
oldStats.Medias = newStats.Medias;
|
||||
if(oldStats.Medias == null) oldStats.Medias = newStats.Medias;
|
||||
else
|
||||
{
|
||||
foreach(MediaStats newMstat in newStats.Medias)
|
||||
@@ -407,7 +418,12 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldMstat.real == newMstat.real && oldMstat.type == newMstat.type)
|
||||
{
|
||||
addMstat = new MediaStats { real = oldMstat.real, type = oldMstat.type, Value = oldMstat.Value + newMstat.Value };
|
||||
addMstat = new MediaStats
|
||||
{
|
||||
real = oldMstat.real,
|
||||
type = oldMstat.type,
|
||||
Value = oldMstat.Value + newMstat.Value
|
||||
};
|
||||
removeMstat = oldMstat;
|
||||
break;
|
||||
}
|
||||
@@ -418,20 +434,17 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.Medias.Remove(removeMstat);
|
||||
oldStats.Medias.Add(addMstat);
|
||||
}
|
||||
else
|
||||
oldStats.Medias.Add(newMstat);
|
||||
else oldStats.Medias.Add(newMstat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(newStats.MediaScan != null)
|
||||
{
|
||||
if(oldStats.MediaScan == null)
|
||||
oldStats.MediaScan = newStats.MediaScan;
|
||||
if(oldStats.MediaScan == null) oldStats.MediaScan = newStats.MediaScan;
|
||||
else
|
||||
{
|
||||
if(oldStats.MediaScan.Sectors == null)
|
||||
oldStats.MediaScan.Sectors = newStats.MediaScan.Sectors;
|
||||
if(oldStats.MediaScan.Sectors == null) oldStats.MediaScan.Sectors = newStats.MediaScan.Sectors;
|
||||
else
|
||||
{
|
||||
oldStats.MediaScan.Sectors.Correct = newStats.MediaScan.Sectors.Correct;
|
||||
@@ -440,8 +453,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
oldStats.MediaScan.Sectors.Unverifiable = newStats.MediaScan.Sectors.Unverifiable;
|
||||
}
|
||||
|
||||
if(oldStats.MediaScan.Times == null)
|
||||
oldStats.MediaScan.Times = newStats.MediaScan.Times;
|
||||
if(oldStats.MediaScan.Times == null) oldStats.MediaScan.Times = newStats.MediaScan.Times;
|
||||
else
|
||||
{
|
||||
oldStats.MediaScan.Times.LessThan10ms = newStats.MediaScan.Times.LessThan10ms;
|
||||
@@ -456,12 +468,10 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(newStats.Verify != null)
|
||||
{
|
||||
if(oldStats.Verify == null)
|
||||
oldStats.Verify = newStats.Verify;
|
||||
if(oldStats.Verify == null) oldStats.Verify = newStats.Verify;
|
||||
else
|
||||
{
|
||||
if(oldStats.Verify.Sectors == null)
|
||||
oldStats.Verify.Sectors = newStats.Verify.Sectors;
|
||||
if(oldStats.Verify.Sectors == null) oldStats.Verify.Sectors = newStats.Verify.Sectors;
|
||||
else
|
||||
{
|
||||
oldStats.Verify.Sectors.Correct = newStats.Verify.Sectors.Correct;
|
||||
@@ -481,16 +491,23 @@ namespace DiscImageChef.Server.Controllers
|
||||
}
|
||||
|
||||
if(oldStats.Devices != null)
|
||||
oldStats.Devices = oldStats.Devices.OrderBy(device => device.Manufacturer).ThenBy(device => device.Model).ThenBy(device => device.Revision).ThenBy(device => device.Bus).ToList();
|
||||
oldStats.Devices = oldStats.Devices.OrderBy(device => device.Manufacturer)
|
||||
.ThenBy(device => device.Model).ThenBy(device => device.Revision)
|
||||
.ThenBy(device => device.Bus).ToList();
|
||||
|
||||
Random rng = new Random();
|
||||
string filename = string.Format("BackupStats_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
while(File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", filename)))
|
||||
string filename = string.Format("BackupStats_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow,
|
||||
rng.Next());
|
||||
while(File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics",
|
||||
filename)))
|
||||
{
|
||||
filename = string.Format("BackupStats_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
}
|
||||
|
||||
FileStream backup = new FileStream(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", filename), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
FileStream backup =
|
||||
new
|
||||
FileStream(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", filename),
|
||||
FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
fs.Seek(0, SeekOrigin.Begin);
|
||||
fs.CopyTo(backup);
|
||||
backup.Close();
|
||||
@@ -527,10 +544,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
}
|
||||
catch(IOException)
|
||||
{
|
||||
if(fs != null)
|
||||
{
|
||||
fs.Dispose();
|
||||
}
|
||||
if(fs != null) { fs.Dispose(); }
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
@@ -538,4 +552,4 @@ namespace DiscImageChef.Server.Controllers
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,16 +36,16 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef's TODO</title>
|
||||
</head>
|
||||
<body id="body" runat="server">
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of things to be donated:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" runat="server" Path="~/docs/DONATING.md" />
|
||||
</div>
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of things to be donated:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" Path="~/docs/DONATING.md" runat="server"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -36,10 +36,13 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef</title>
|
||||
</head>
|
||||
<body id="body" runat="server">
|
||||
<h1 align="center">Welcome to <i><a href="http://github.com/claunia/discimagechef" target="_blank">DiscImageChef</a></i> Server version <asp:Label id="lblVersion" runat="server"/></h1>
|
||||
<h1 align="center">Welcome to <i>
|
||||
<a href="http://github.com/claunia/discimagechef" target="_blank">DiscImageChef</a>
|
||||
</i> Server version <asp:Label id="lblVersion" runat="server"/>
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -36,13 +36,13 @@ using Velyo.AspNet.Markdown;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
MarkdownContent mkdown = new MarkdownContent();
|
||||
StreamReader sr = new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "docs", "README.md"));
|
||||
StreamReader sr =
|
||||
new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "docs", "README.md"));
|
||||
string mdcontent = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
|
||||
@@ -52,4 +52,4 @@ namespace DiscImageChef.Server
|
||||
lblVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<%@ Application Inherits="DiscImageChef.Server.Global" %>
|
||||
<%@ Application Inherits="DiscImageChef.Server.Global" %>
|
||||
@@ -42,4 +42,4 @@ namespace DiscImageChef.Server
|
||||
GlobalConfiguration.Configure(WebApiConfig.Register);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,4 +54,4 @@ using System.Reflection;
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
@@ -36,196 +36,243 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<title>DiscImageChef Statistics</title>
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef Statistics</title>
|
||||
</head>
|
||||
<body id="body" runat="server">
|
||||
<h1 align="center">Welcome to <i><a href="http://github.com/claunia/discimagechef" target="_blank">DiscImageChef</a></i> Server version <asp:Label id="lblVersion" runat="server"/></h1>
|
||||
<h1 align="center">Welcome to <i>
|
||||
<a href="http://github.com/claunia/discimagechef" target="_blank">DiscImageChef</a>
|
||||
</i> Server version <asp:Label id="lblVersion" runat="server"/>
|
||||
</h1>
|
||||
<br/>
|
||||
<div id="content" runat="server">
|
||||
<div id="divOperatingSystems" runat="server">
|
||||
<table>
|
||||
<asp:Repeater id="repOperatingSystems" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>DiscImageChef has run on <i>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</i> <asp:Label runat="server" Text='<%# Eval("Value") %>'/> times.
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
<br/>
|
||||
<div id="content" runat="server">
|
||||
<div id="divOperatingSystems" runat="server">
|
||||
<table>
|
||||
<asp:Repeater id="repOperatingSystems" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>DiscImageChef has run on <i><asp:Label runat="server" Text='<%# Eval("name") %>' /></i> <asp:Label runat="server" Text='<%# Eval("Value") %>' /> times.</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
<br/>
|
||||
</div>
|
||||
<div id="divVersions" runat="server">
|
||||
<table>
|
||||
<asp:Repeater id="repVersions" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>DiscImageChef version <i><asp:Label runat="server" Text='<%# Eval("name") %>' /></i> has been used <asp:Label runat="server" Text='<%# Eval("Value") %>' /> times.</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
<br/>
|
||||
</div>
|
||||
<div id="divCommands" runat="server">
|
||||
<h4>Commands run:</h4>
|
||||
<p>
|
||||
<i>analyze</i> command has been run <asp:Label id="lblAnalyze" runat="server"/> times<br/>
|
||||
<i>benchmark</i> command has been run <asp:Label id="lblBenchmark" runat="server"/> times<br/>
|
||||
<i>checksum</i> command has been run <asp:Label id="lblChecksum" runat="server"/> times<br/>
|
||||
<i>compare</i> command has been run <asp:Label id="lblCompare" runat="server"/> times<br/>
|
||||
<i>create-sidecar</i> command has been run <asp:Label id="lblCreateSidecar" runat="server"/> times<br/>
|
||||
<i>decode</i> command has been run <asp:Label id="lblDecode" runat="server"/> times<br/>
|
||||
<i>device-info</i> command has been run <asp:Label id="lblDeviceInfo" runat="server"/> times<br/>
|
||||
<i>device-report</i> command has been run <asp:Label id="lblDeviceReport" runat="server"/> times<br/>
|
||||
<i>dump-media</i> command has been run <asp:Label id="lblDumpMedia" runat="server"/> times<br/>
|
||||
<i>entropy</i> command has been run <asp:Label id="lblEntropy" runat="server"/> times<br/>
|
||||
<i>extract-files</i> command has been run <asp:Label id="lblExtractFiles" runat="server"/> times<br/>
|
||||
<i>formats</i> command has been run <asp:Label id="lblFormats" runat="server"/> times<br/>
|
||||
<i>list-devices</i> command has been run <asp:Label id="lblListDevices" runat="server"/> times<br/>
|
||||
<i>list-encodings</i> command has been run <asp:Label id="lblListEncodings" runat="server"/> times<br/>
|
||||
<i>ls</i> command has been run <asp:Label id="lblLs" runat="server"/> times<br/>
|
||||
<i>media-info</i> command has been run <asp:Label id="lblMediaInfo" runat="server"/> times<br/>
|
||||
<i>media-scan</i> command has been run <asp:Label id="lblMediaScan" runat="server"/> times<br/>
|
||||
<i>printhex</i> command has been run <asp:Label id="lblPrintHex" runat="server"/> times<br/>
|
||||
<i>verify</i> command has been run <asp:Label id="lblVerify" runat="server"/> times
|
||||
</p>
|
||||
</div>
|
||||
<div id="divFilters" runat="server">
|
||||
<h3>Filters found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Filter</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repFilters" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("name") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Value")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divMediaImages" runat="server">
|
||||
<h3>Media image formats found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Media image format</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repMediaImages" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("name") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divPartitions" runat="server">
|
||||
<h3>Partition schemes found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Partition scheme</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repPartitions" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("name") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divFilesystems" runat="server">
|
||||
<h3>Filesystems found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Filesystem name</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repFilesystems" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("name") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divVirtualMedia" runat="server">
|
||||
<h3>Media types found in images:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Physical type</th>
|
||||
<th>Logical type</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repVirtualMedia" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Type") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("SubType") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Count")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divRealMedia" runat="server">
|
||||
<h3>Media types found in devices:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Physical type</th>
|
||||
<th>Logical type</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repRealMedia" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Type") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("SubType") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Count")) %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divDevices" runat="server">
|
||||
<h3>Found devices:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Manufacturer</th>
|
||||
<th>Model</th>
|
||||
<th>Revision</th>
|
||||
<th>Bus</th>
|
||||
<th>Report</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repDevices" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Manufacturer") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Model") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Revision") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("Bus") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("ReportLink") %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<footer>
|
||||
© 2011-2017 <a href="http://www.claunia.com" target="_blank">Claunia.com</a><br/>
|
||||
Fonts are © 2015-2016 <a href="http://int10h.org" target="_blank">VileR</a><br/>
|
||||
CSS © 2017 <a href="http://www.freedos.org" target="_blank">The FreeDOS Project</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div id="divVersions" runat="server">
|
||||
<table>
|
||||
<asp:Repeater id="repVersions" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>DiscImageChef version <i>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</i> has been used <asp:Label runat="server" Text='<%# Eval("Value") %>'/> times.
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
<br/>
|
||||
</div>
|
||||
<div id="divCommands" runat="server">
|
||||
<h4>Commands run:</h4>
|
||||
<p>
|
||||
<i>analyze</i> command has been run <asp:Label id="lblAnalyze" runat="server"/> times<br/>
|
||||
<i>benchmark</i> command has been run <asp:Label id="lblBenchmark" runat="server"/> times<br/>
|
||||
<i>checksum</i> command has been run <asp:Label id="lblChecksum" runat="server"/> times<br/>
|
||||
<i>compare</i> command has been run <asp:Label id="lblCompare" runat="server"/> times<br/>
|
||||
<i>create-sidecar</i> command has been run <asp:Label id="lblCreateSidecar" runat="server"/> times<br/>
|
||||
<i>decode</i> command has been run <asp:Label id="lblDecode" runat="server"/> times<br/>
|
||||
<i>device-info</i> command has been run <asp:Label id="lblDeviceInfo" runat="server"/> times<br/>
|
||||
<i>device-report</i> command has been run <asp:Label id="lblDeviceReport" runat="server"/> times<br/>
|
||||
<i>dump-media</i> command has been run <asp:Label id="lblDumpMedia" runat="server"/> times<br/>
|
||||
<i>entropy</i> command has been run <asp:Label id="lblEntropy" runat="server"/> times<br/>
|
||||
<i>extract-files</i> command has been run <asp:Label id="lblExtractFiles" runat="server"/> times<br/>
|
||||
<i>formats</i> command has been run <asp:Label id="lblFormats" runat="server"/> times<br/>
|
||||
<i>list-devices</i> command has been run <asp:Label id="lblListDevices" runat="server"/> times<br/>
|
||||
<i>list-encodings</i> command has been run <asp:Label id="lblListEncodings" runat="server"/> times<br/>
|
||||
<i>ls</i> command has been run <asp:Label id="lblLs" runat="server"/> times<br/>
|
||||
<i>media-info</i> command has been run <asp:Label id="lblMediaInfo" runat="server"/> times<br/>
|
||||
<i>media-scan</i> command has been run <asp:Label id="lblMediaScan" runat="server"/> times<br/>
|
||||
<i>printhex</i> command has been run <asp:Label id="lblPrintHex" runat="server"/> times<br/>
|
||||
<i>verify</i> command has been run <asp:Label id="lblVerify" runat="server"/> times
|
||||
</p>
|
||||
</div>
|
||||
<div id="divFilters" runat="server">
|
||||
<h3>Filters found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Filter</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repFilters" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Value")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divMediaImages" runat="server">
|
||||
<h3>Media image formats found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Media image format</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repMediaImages" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divPartitions" runat="server">
|
||||
<h3>Partition schemes found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Partition scheme</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repPartitions" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divFilesystems" runat="server">
|
||||
<h3>Filesystems found:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Filesystem name</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repFilesystems" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("name") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("value")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divVirtualMedia" runat="server">
|
||||
<h3>Media types found in images:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Physical type</th>
|
||||
<th>Logical type</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repVirtualMedia" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Type") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("SubType") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Count")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divRealMedia" runat="server">
|
||||
<h3>Media types found in devices:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Physical type</th>
|
||||
<th>Logical type</th>
|
||||
<th>Times</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repRealMedia" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Type") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("SubType") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Count")) %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divDevices" runat="server">
|
||||
<h3>Found devices:</h3>
|
||||
<table align="center" border="1">
|
||||
<tr>
|
||||
<th>Manufacturer</th>
|
||||
<th>Model</th>
|
||||
<th>Revision</th>
|
||||
<th>Bus</th>
|
||||
<th>Report</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repDevices" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Manufacturer") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Model") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Revision") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("Bus") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("ReportLink") %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<footer>
|
||||
© 2011-2017 <a href="http://www.claunia.com" target="_blank">Claunia.com</a><br/>
|
||||
Fonts are © 2015-2016 <a href="http://int10h.org" target="_blank">VileR</a><br/>
|
||||
CSS © 2017 <a href="http://www.freedos.org" target="_blank">The FreeDOS Project</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -72,10 +72,13 @@ namespace DiscImageChef.Server
|
||||
|
||||
try
|
||||
{
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml")))
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics",
|
||||
"Statistics.xml")))
|
||||
{
|
||||
#if DEBUG
|
||||
content.InnerHtml = string.Format("<b>Sorry, cannot load data file \"{0}\"</b>", Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"));
|
||||
content.InnerHtml = string.Format("<b>Sorry, cannot load data file \"{0}\"</b>",
|
||||
Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"),
|
||||
"Statistics", "Statistics.xml"));
|
||||
#else
|
||||
content.InnerHtml = "<b>Sorry, cannot load data file</b>";
|
||||
#endif
|
||||
@@ -85,7 +88,9 @@ namespace DiscImageChef.Server
|
||||
statistics = new Stats();
|
||||
|
||||
XmlSerializer xs = new XmlSerializer(statistics.GetType());
|
||||
FileStream fs = WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"), FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
FileStream fs =
|
||||
WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
statistics = (Stats)xs.Deserialize(fs);
|
||||
fs.Close();
|
||||
|
||||
@@ -93,13 +98,20 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
operatingSystems = new List<NameValueStats>();
|
||||
foreach(OsStats nvs in statistics.OperatingSystems)
|
||||
operatingSystems.Add(new NameValueStats { name = string.Format("{0}{1}{2}", Interop.DetectOS.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name), nvs.version),
|
||||
string.IsNullOrEmpty(nvs.version) ? "" : " ", nvs.version), Value = nvs.Value });
|
||||
operatingSystems.Add(new NameValueStats
|
||||
{
|
||||
name = string.Format("{0}{1}{2}",
|
||||
Interop.DetectOS
|
||||
.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name),
|
||||
nvs.version),
|
||||
string.IsNullOrEmpty(nvs.version) ? "" : " ", nvs.version),
|
||||
Value = nvs.Value
|
||||
});
|
||||
|
||||
repOperatingSystems.DataSource = operatingSystems.OrderBy(os => os.name).ToList();
|
||||
repOperatingSystems.DataBind();
|
||||
}
|
||||
else
|
||||
divOperatingSystems.Visible = false;
|
||||
else divOperatingSystems.Visible = false;
|
||||
|
||||
if(statistics.Versions != null)
|
||||
{
|
||||
@@ -107,15 +119,14 @@ namespace DiscImageChef.Server
|
||||
foreach(NameValueStats nvs in statistics.Versions)
|
||||
{
|
||||
if(nvs.name == "previous")
|
||||
versions.Add(new NameValueStats { name = "Previous than 3.4.99.0", Value = nvs.Value });
|
||||
else
|
||||
versions.Add(nvs);
|
||||
versions.Add(new NameValueStats {name = "Previous than 3.4.99.0", Value = nvs.Value});
|
||||
else versions.Add(nvs);
|
||||
}
|
||||
|
||||
repVersions.DataSource = versions.OrderBy(ver => ver.name).ToList();
|
||||
repVersions.DataBind();
|
||||
}
|
||||
else
|
||||
divVersions.Visible = false;
|
||||
else divVersions.Visible = false;
|
||||
|
||||
if(statistics.Commands != null)
|
||||
{
|
||||
@@ -139,40 +150,35 @@ namespace DiscImageChef.Server
|
||||
lblListDevices.Text = statistics.Commands.ListDevices.ToString();
|
||||
lblListEncodings.Text = statistics.Commands.ListEncodings.ToString();
|
||||
}
|
||||
else
|
||||
divCommands.Visible = false;
|
||||
else divCommands.Visible = false;
|
||||
|
||||
if(statistics.Filters != null)
|
||||
{
|
||||
repFilters.DataSource = statistics.Filters.OrderBy(filter => filter.name).ToList();
|
||||
repFilters.DataBind();
|
||||
}
|
||||
else
|
||||
divFilters.Visible = false;
|
||||
else divFilters.Visible = false;
|
||||
|
||||
if(statistics.MediaImages != null)
|
||||
{
|
||||
repMediaImages.DataSource = statistics.MediaImages.OrderBy(filter => filter.name).ToList();
|
||||
repMediaImages.DataBind();
|
||||
}
|
||||
else
|
||||
divMediaImages.Visible = false;
|
||||
else divMediaImages.Visible = false;
|
||||
|
||||
if(statistics.Partitions != null)
|
||||
{
|
||||
repPartitions.DataSource = statistics.Partitions.OrderBy(filter => filter.name).ToList();
|
||||
repPartitions.DataBind();
|
||||
}
|
||||
else
|
||||
divPartitions.Visible = false;
|
||||
else divPartitions.Visible = false;
|
||||
|
||||
if(statistics.Filesystems != null)
|
||||
{
|
||||
repFilesystems.DataSource = statistics.Filesystems.OrderBy(filter => filter.name).ToList();
|
||||
repFilesystems.DataBind();
|
||||
}
|
||||
else
|
||||
divFilesystems.Visible = false;
|
||||
else divFilesystems.Visible = false;
|
||||
|
||||
if(statistics.Medias != null)
|
||||
{
|
||||
@@ -183,29 +189,29 @@ namespace DiscImageChef.Server
|
||||
string type;
|
||||
string subtype;
|
||||
|
||||
MediaType.MediaTypeToString((CommonTypes.MediaType)Enum.Parse(typeof(CommonTypes.MediaType), nvs.type), out type, out subtype);
|
||||
MediaType
|
||||
.MediaTypeToString((CommonTypes.MediaType)Enum.Parse(typeof(CommonTypes.MediaType), nvs.type),
|
||||
out type, out subtype);
|
||||
|
||||
if(nvs.real)
|
||||
realMedia.Add(new MediaItem { Type = type, SubType = subtype, Count = nvs.Value });
|
||||
else
|
||||
virtualMedia.Add(new MediaItem { Type = type, SubType = subtype, Count = nvs.Value });
|
||||
if(nvs.real) realMedia.Add(new MediaItem {Type = type, SubType = subtype, Count = nvs.Value});
|
||||
else virtualMedia.Add(new MediaItem {Type = type, SubType = subtype, Count = nvs.Value});
|
||||
}
|
||||
|
||||
if(realMedia.Count > 0)
|
||||
{
|
||||
repRealMedia.DataSource = realMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
|
||||
repRealMedia.DataSource =
|
||||
realMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
|
||||
repRealMedia.DataBind();
|
||||
}
|
||||
else
|
||||
divRealMedia.Visible = false;
|
||||
else divRealMedia.Visible = false;
|
||||
|
||||
if(virtualMedia.Count > 0)
|
||||
{
|
||||
repVirtualMedia.DataSource = virtualMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
|
||||
repVirtualMedia.DataSource =
|
||||
virtualMedia.OrderBy(media => media.Type).ThenBy(media => media.SubType).ToList();
|
||||
repVirtualMedia.DataBind();
|
||||
}
|
||||
else
|
||||
divVirtualMedia.Visible = false;
|
||||
else divVirtualMedia.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -220,37 +226,40 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
string url = null;
|
||||
string xmlFile;
|
||||
if(!string.IsNullOrWhiteSpace(device.Manufacturer) && !string.IsNullOrWhiteSpace(device.Model) && !string.IsNullOrWhiteSpace(device.Revision))
|
||||
if(!string.IsNullOrWhiteSpace(device.Manufacturer) &&
|
||||
!string.IsNullOrWhiteSpace(device.Model) && !string.IsNullOrWhiteSpace(device.Revision))
|
||||
{
|
||||
xmlFile = device.Manufacturer + "_" + device.Model + "_" + device.Revision + ".xml";
|
||||
url = string.Format("ViewReport.aspx?manufacturer={0}&model={1}&revision={2}",
|
||||
HttpUtility.UrlPathEncode(device.Manufacturer), HttpUtility.UrlPathEncode(device.Model), HttpUtility.UrlPathEncode(device.Revision));
|
||||
HttpUtility.UrlPathEncode(device.Manufacturer),
|
||||
HttpUtility.UrlPathEncode(device.Model),
|
||||
HttpUtility.UrlPathEncode(device.Revision));
|
||||
}
|
||||
else if(!string.IsNullOrWhiteSpace(device.Manufacturer) && !string.IsNullOrWhiteSpace(device.Model))
|
||||
else if(!string.IsNullOrWhiteSpace(device.Manufacturer) &&
|
||||
!string.IsNullOrWhiteSpace(device.Model))
|
||||
{
|
||||
xmlFile = device.Manufacturer + "_" + device.Model + ".xml";
|
||||
url = string.Format("ViewReport.aspx?manufacturer={0}&model={1}",
|
||||
HttpUtility.UrlPathEncode(device.Manufacturer), HttpUtility.UrlPathEncode(device.Model));
|
||||
HttpUtility.UrlPathEncode(device.Manufacturer),
|
||||
HttpUtility.UrlPathEncode(device.Model));
|
||||
}
|
||||
else if(!string.IsNullOrWhiteSpace(device.Model) && !string.IsNullOrWhiteSpace(device.Revision))
|
||||
{
|
||||
xmlFile = device.Model + "_" + device.Revision + ".xml";
|
||||
url = string.Format("ViewReport.aspx?model={0}&revision={1}",
|
||||
HttpUtility.UrlPathEncode(device.Model), HttpUtility.UrlPathEncode(device.Revision));
|
||||
HttpUtility.UrlPathEncode(device.Model),
|
||||
HttpUtility.UrlPathEncode(device.Revision));
|
||||
}
|
||||
else
|
||||
{
|
||||
xmlFile = device.Model + ".xml";
|
||||
url = string.Format("ViewReport.aspx?model={0}",
|
||||
HttpUtility.UrlPathEncode(device.Model));
|
||||
url = string.Format("ViewReport.aspx?model={0}", HttpUtility.UrlPathEncode(device.Model));
|
||||
}
|
||||
|
||||
xmlFile = xmlFile.Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
|
||||
{
|
||||
url = null;
|
||||
}
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports",
|
||||
xmlFile))) { url = null; }
|
||||
|
||||
devices.Add(new DeviceItem()
|
||||
{
|
||||
@@ -258,15 +267,17 @@ namespace DiscImageChef.Server
|
||||
Model = device.Model,
|
||||
Revision = device.Revision,
|
||||
Bus = device.Bus,
|
||||
ReportLink = url == null ? "No" : string.Format("<a href=\"{0}\" target=\"_blank\">Yes</a>", url)
|
||||
ReportLink =
|
||||
url == null ? "No" : string.Format("<a href=\"{0}\" target=\"_blank\">Yes</a>", url)
|
||||
});
|
||||
}
|
||||
repDevices.DataSource = devices.OrderBy(device => device.Manufacturer).ThenBy(device => device.Model).ThenBy(device => device.Revision).ThenBy(device => device.Bus).ToList();
|
||||
|
||||
repDevices.DataSource = devices.OrderBy(device => device.Manufacturer)
|
||||
.ThenBy(device => device.Model).ThenBy(device => device.Revision)
|
||||
.ThenBy(device => device.Bus).ToList();
|
||||
repDevices.DataBind();
|
||||
}
|
||||
else
|
||||
divDevices.Visible = false;
|
||||
|
||||
else divDevices.Visible = false;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
@@ -289,10 +300,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
catch(IOException)
|
||||
{
|
||||
if(fs != null)
|
||||
{
|
||||
fs.Dispose();
|
||||
}
|
||||
if(fs != null) { fs.Dispose(); }
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
@@ -300,4 +308,4 @@ namespace DiscImageChef.Server
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<DicStats xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
|
||||
|
||||
<DicStats xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
|
||||
@@ -36,16 +36,16 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef's TODO</title>
|
||||
</head>
|
||||
<body id="body" runat="server">
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of things to do:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" runat="server" Path="~/docs/TODO.md" />
|
||||
</div>
|
||||
<p>
|
||||
<a href="Default.aspx">Return to main page.</a><br/>
|
||||
DiscImageChef list of things to do:
|
||||
</p>
|
||||
<div>
|
||||
<velyo:MarkdownContent ID="todo" Path="~/docs/TODO.md" runat="server"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -36,174 +36,186 @@
|
||||
<html>
|
||||
<meta charset="UTF-8">
|
||||
<head runat="server">
|
||||
<link type='text/css' rel='stylesheet' href='dos.css' />
|
||||
<link href='dos.css' rel='stylesheet' type='text/css'/>
|
||||
<title>DiscImageChef Device Report</title>
|
||||
</head>
|
||||
<body id="content" runat="server">
|
||||
DiscImageChef Report for <asp:Label id="lblManufacturer" runat="server"/> <asp:Label id="lblModel" runat="server"/> <asp:Label id="lblRevision" runat="server"/>
|
||||
<div id="divUsb" runat="server">
|
||||
<br/>
|
||||
<b>USB characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblUsbManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblUsbProduct" runat="server"/><br/>
|
||||
<i>Vendor ID:</i> <asp:Label id="lblUsbVendor" runat="server"/> <asp:Label id="lblUsbVendorDescription" runat="server"/><br/>
|
||||
<i>Product ID:</i> <asp:Label id="lblUsbProductId" runat="server"/> <asp:Label id="lblUsbProductDescription" runat="server"/>
|
||||
</div>
|
||||
<div id="divFirewire" runat="server">
|
||||
<br/>
|
||||
<b>FireWire characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblFirewireManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblFirewireProduct" runat="server"/><br/>
|
||||
<i>Vendor ID:</i> <asp:Label id="lblFirewireVendor" runat="server"/><br/>
|
||||
<i>Product ID:</i> <asp:Label id="lblFirewireProductId" runat="server"/>
|
||||
</div>
|
||||
<div id="divPcmcia" runat="server">
|
||||
<br/>
|
||||
<b>PCMCIA characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblPcmciaManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblPcmciaProduct" runat="server"/><br/>
|
||||
<i>Manufacturer code:</i> <asp:Label id="lblPcmciaManufacturerCode" runat="server"/><br/>
|
||||
<i>Card code:</i> <asp:Label id="lblPcmciaCardCode" runat="server"/><br/>
|
||||
<i>Compliance:</i> <asp:Label id="lblPcmciaCompliance" runat="server"/>
|
||||
<asp:Repeater ID="repPcmciaTuples" runat="server">
|
||||
<ItemTemplate>
|
||||
<i><asp:Label runat="server" Text='<%# Eval("key") %>' /></i>: <asp:Label runat="server" Text='<%# Eval("value") %>' /><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
DiscImageChef Report for <asp:Label id="lblManufacturer" runat="server"/> <asp:Label id="lblModel" runat="server"/> <asp:Label id="lblRevision" runat="server"/>
|
||||
<div id="divUsb" runat="server">
|
||||
<br/>
|
||||
<b>USB characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblUsbManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblUsbProduct" runat="server"/><br/>
|
||||
<i>Vendor ID:</i> <asp:Label id="lblUsbVendor" runat="server"/> <asp:Label id="lblUsbVendorDescription" runat="server"/><br/>
|
||||
<i>Product ID:</i> <asp:Label id="lblUsbProductId" runat="server"/> <asp:Label id="lblUsbProductDescription" runat="server"/>
|
||||
</div>
|
||||
<div id="divFirewire" runat="server">
|
||||
<br/>
|
||||
<b>FireWire characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblFirewireManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblFirewireProduct" runat="server"/><br/>
|
||||
<i>Vendor ID:</i> <asp:Label id="lblFirewireVendor" runat="server"/><br/>
|
||||
<i>Product ID:</i> <asp:Label id="lblFirewireProductId" runat="server"/>
|
||||
</div>
|
||||
<div id="divPcmcia" runat="server">
|
||||
<br/>
|
||||
<b>PCMCIA characteristics:</b><br/>
|
||||
<i>Manufacturer:</i> <asp:Label id="lblPcmciaManufacturer" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblPcmciaProduct" runat="server"/><br/>
|
||||
<i>Manufacturer code:</i> <asp:Label id="lblPcmciaManufacturerCode" runat="server"/><br/>
|
||||
<i>Card code:</i> <asp:Label id="lblPcmciaCardCode" runat="server"/><br/>
|
||||
<i>Compliance:</i> <asp:Label id="lblPcmciaCompliance" runat="server"/>
|
||||
<asp:Repeater ID="repPcmciaTuples" runat="server">
|
||||
<ItemTemplate>
|
||||
<i>
|
||||
<asp:Label runat="server" Text='<%# Eval("key") %>'/>
|
||||
</i>: <asp:Label runat="server" Text='<%# Eval("value") %>'/><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
|
||||
</div>
|
||||
<div id="divAta" runat="server">
|
||||
<br/>
|
||||
<b>ATA<asp:Label id="lblAtapi" runat="server"/> characteristics:</b><br/>
|
||||
<asp:Label id="lblAtaDeviceType" runat="server"/><br/>
|
||||
<asp:Repeater ID="repAtaTwo" runat="server">
|
||||
</div>
|
||||
<div id="divAta" runat="server">
|
||||
<br/>
|
||||
<b>ATA<asp:Label id="lblAtapi" runat="server"/> characteristics:</b><br/>
|
||||
<asp:Label id="lblAtaDeviceType" runat="server"/><br/>
|
||||
<asp:Repeater ID="repAtaTwo" runat="server">
|
||||
<ItemTemplate>
|
||||
<i>
|
||||
<asp:Label runat="server" Text='<%# Eval("key") %>'/>
|
||||
</i>: <asp:Label runat="server" Text='<%# Eval("value") %>'/><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<br/>
|
||||
<asp:Repeater ID="repAtaOne" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divScsi" runat="server">
|
||||
<br/>
|
||||
<b>SCSI characteristics:</b><br/>
|
||||
<i>Vendor:</i> <asp:Label id="lblScsiVendor" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblScsiProduct" runat="server"/><br/>
|
||||
<i>Revision:</i> <asp:Label id="lblScsiRevision" runat="server"/><br/>
|
||||
<asp:Repeater ID="repScsi" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<div id="divScsiModeSense" runat="server">
|
||||
<br/><i>SCSI mode sense pages:</i>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Mode</th>
|
||||
<th>Contents</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repModeSense" runat="server">
|
||||
<ItemTemplate>
|
||||
<i><asp:Label runat="server" Text='<%# Eval("key") %>' /></i>: <asp:Label runat="server" Text='<%# Eval("value") %>' /><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<br/>
|
||||
<asp:Repeater ID="repAtaOne" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divScsi" runat="server">
|
||||
<br/>
|
||||
<b>SCSI characteristics:</b><br/>
|
||||
<i>Vendor:</i> <asp:Label id="lblScsiVendor" runat="server"/><br/>
|
||||
<i>Product:</i> <asp:Label id="lblScsiProduct" runat="server"/><br/>
|
||||
<i>Revision:</i> <asp:Label id="lblScsiRevision" runat="server"/><br/>
|
||||
<asp:Repeater ID="repScsi" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<div id="divScsiModeSense" runat="server">
|
||||
<br/><i>SCSI mode sense pages:</i>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Mode</th>
|
||||
<th>Contents</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repModeSense" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("key") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("value") %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divScsiEvpd" runat="server">
|
||||
<br/><i>SCSI extended vital product data pages:</i>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>EVPD</th>
|
||||
<th>Contents</th>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("key") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("value") %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
<asp:Repeater ID="repEvpd" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("key") %>' /></td>
|
||||
<td><asp:Label runat="server" Text='<%# Eval("value") %>' /></td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divScsiMmcMode" runat="server">
|
||||
<br/><b>SCSI CD-ROM capabilities:</b><br/>
|
||||
<asp:Repeater ID="repScsiMmcMode" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divScsiMmcFeatures" runat="server">
|
||||
<br/><b>SCSI MMC features:</b><br/>
|
||||
<asp:Repeater ID="repScsiMmcFeatures" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divScsiSsc" runat="server">
|
||||
<br/><b>SCSI Streaming device capabilities:</b><br/>
|
||||
Block size granularity: <asp:Label runat="server" id="lblScsiSscGranularity"/><br/>
|
||||
Maximum block length: <asp:Label runat="server" id="lblScsiSscMaxBlock"/> bytes<br/>
|
||||
Minimum block length: <asp:Label runat="server" id="lblScsiSscMinBlock"/> bytes<br/>
|
||||
<asp:Repeater ID="repScsiSscDensities" runat="server">
|
||||
<ItemTemplate>
|
||||
<br/><b>Information for supported density with primary code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("PrimaryCode")) %>' /> and secondary code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("SecondaryCode")) %>' /></b><br/>
|
||||
Drive can write this density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Writable")) %>' /><br/>
|
||||
Duplicate density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Duplicate")) %>' /><br/>
|
||||
Default density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("DefaultDensity")) %>' /><br/>
|
||||
Density has <asp:Label runat="server" Text='<%# Eval("BitsPerMm") %>' /> bits per mm, with <asp:Label runat="server" Text='<%# Eval("Tracks") %>' /> tracks in a <asp:Label runat="server" Text='<%# Eval("Width") %>' /> mm width tape
|
||||
Name: <asp:Label runat="server" Text='<%# Eval("Name") %>' /><br/>
|
||||
Organization: <asp:Label runat="server" Text='<%# Eval("Organization") %>' /><br/>
|
||||
Description: <asp:Label runat="server" Text='<%# Eval("Description") %>' /><br/>
|
||||
Maximum capacity: <asp:Label runat="server" Text='<%# Eval("Capacity") %>' /> megabytes<br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:Repeater ID="repScsiSscMedias" runat="server">
|
||||
<ItemTemplate>
|
||||
<br/><b>Information for supported media with type code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("MediumType")) %>' /></b><br/>
|
||||
Drive can write this density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Writable")) %>' /><br/>
|
||||
Media is <asp:Label runat="server" Text='<%# Eval("Length") %>' /> meters long in a <asp:Label runat="server" Text='<%# Eval("Width") %>' /> mm width tape
|
||||
Name: <asp:Label runat="server" Text='<%# Eval("Name") %>' /><br/>
|
||||
Organization: <asp:Label runat="server" Text='<%# Eval("Organization") %>' /><br/>
|
||||
Description: <asp:Label runat="server" Text='<%# Eval("Description") %>' /><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divTestedMedia" runat="server">
|
||||
<br/><b>Tested media:</b><br/>
|
||||
<asp:Repeater ID="repTestedMedia" runat="server">
|
||||
<div id="divScsiEvpd" runat="server">
|
||||
<br/><i>SCSI extended vital product data pages:</i>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>EVPD</th>
|
||||
<th>Contents</th>
|
||||
</tr>
|
||||
<asp:Repeater ID="repEvpd" runat="server">
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("key") %>'/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" Text='<%# Eval("value") %>'/>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</table>
|
||||
</div>
|
||||
<div id="divScsiMmcMode" runat="server">
|
||||
<br/><b>SCSI CD-ROM capabilities:</b><br/>
|
||||
<asp:Repeater ID="repScsiMmcMode" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divMMC" runat="server">
|
||||
<br/>
|
||||
<b>MultiMediaCard device:</b><br/>
|
||||
<asp:Repeater ID="repMMC" runat="server">
|
||||
<div id="divScsiMmcFeatures" runat="server">
|
||||
<br/><b>SCSI MMC features:</b><br/>
|
||||
<asp:Repeater ID="repScsiMmcFeatures" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divSD" runat="server">
|
||||
<br/>
|
||||
<b>SecureDigital device:</b><br/>
|
||||
<asp:Repeater ID="repSD" runat="server">
|
||||
<div id="divScsiSsc" runat="server">
|
||||
<br/><b>SCSI Streaming device capabilities:</b><br/>
|
||||
Block size granularity: <asp:Label id="lblScsiSscGranularity" runat="server"/><br/>
|
||||
Maximum block length: <asp:Label id="lblScsiSscMaxBlock" runat="server"/> bytes<br/>
|
||||
Minimum block length: <asp:Label id="lblScsiSscMinBlock" runat="server"/> bytes<br/>
|
||||
<asp:Repeater ID="repScsiSscDensities" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty%><br/>
|
||||
<br/><b>Information for supported density with primary code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("PrimaryCode")) %>'/> and secondary code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("SecondaryCode")) %>'/></b><br/>
|
||||
Drive can write this density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Writable")) %>'/><br/>
|
||||
Duplicate density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Duplicate")) %>'/><br/>
|
||||
Default density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("DefaultDensity")) %>'/><br/>
|
||||
Density has <asp:Label runat="server" Text='<%# Eval("BitsPerMm") %>'/> bits per mm, with <asp:Label runat="server" Text='<%# Eval("Tracks") %>'/> tracks in a <asp:Label runat="server" Text='<%# Eval("Width") %>'/> mm width tape
|
||||
Name: <asp:Label runat="server" Text='<%# Eval("Name") %>'/><br/>
|
||||
Organization: <asp:Label runat="server" Text='<%# Eval("Organization") %>'/><br/>
|
||||
Description: <asp:Label runat="server" Text='<%# Eval("Description") %>'/><br/>
|
||||
Maximum capacity: <asp:Label runat="server" Text='<%# Eval("Capacity") %>'/> megabytes<br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:Repeater ID="repScsiSscMedias" runat="server">
|
||||
<ItemTemplate>
|
||||
<br/><b>Information for supported media with type code <asp:Label runat="server" Text='<%# string.Format("{0:X2h}", Eval("MediumType")) %>'/></b><br/>
|
||||
Drive can write this density: <asp:Label runat="server" Text='<%# string.Format("{0}", Eval("Writable")) %>'/><br/>
|
||||
Media is <asp:Label runat="server" Text='<%# Eval("Length") %>'/> meters long in a <asp:Label runat="server" Text='<%# Eval("Width") %>'/> mm width tape
|
||||
Name: <asp:Label runat="server" Text='<%# Eval("Name") %>'/><br/>
|
||||
Organization: <asp:Label runat="server" Text='<%# Eval("Organization") %>'/><br/>
|
||||
Description: <asp:Label runat="server" Text='<%# Eval("Description") %>'/><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divTestedMedia" runat="server">
|
||||
<br/><b>Tested media:</b><br/>
|
||||
<asp:Repeater ID="repTestedMedia" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divMMC" runat="server">
|
||||
<br/>
|
||||
<b>MultiMediaCard device:</b><br/>
|
||||
<asp:Repeater ID="repMMC" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="divSD" runat="server">
|
||||
<br/>
|
||||
<b>SecureDigital device:</b><br/>
|
||||
<asp:Repeater ID="repSD" runat="server">
|
||||
<ItemTemplate>
|
||||
<%# Container.DataItem?.ToString() ?? string.Empty %><br/>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -42,7 +42,6 @@ using DiscImageChef.Server.App_Start;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
|
||||
public partial class ViewReport : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -55,23 +54,31 @@ namespace DiscImageChef.Server
|
||||
|
||||
// Strip non-ascii, strip slashes and question marks
|
||||
if(manufacturer != null)
|
||||
manufacturer = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, Encoding.UTF8.GetBytes(manufacturer))).Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
manufacturer = Encoding
|
||||
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII,
|
||||
Encoding.UTF8.GetBytes(manufacturer))).Replace('/', '_')
|
||||
.Replace('\\', '_').Replace('?', '_');
|
||||
if(model != null)
|
||||
model = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, Encoding.UTF8.GetBytes(model))).Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
model = Encoding
|
||||
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, Encoding.UTF8.GetBytes(model)))
|
||||
.Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
if(revision != null)
|
||||
revision = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, Encoding.UTF8.GetBytes(revision))).Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
revision = Encoding
|
||||
.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII,
|
||||
Encoding.UTF8.GetBytes(revision))).Replace('/', '_')
|
||||
.Replace('\\', '_').Replace('?', '_');
|
||||
|
||||
string xmlFile = null;
|
||||
if(!string.IsNullOrWhiteSpace(manufacturer) && !string.IsNullOrWhiteSpace(model) && !string.IsNullOrWhiteSpace(revision))
|
||||
xmlFile = manufacturer + "_" + model + "_" + revision + ".xml";
|
||||
if(!string.IsNullOrWhiteSpace(manufacturer) && !string.IsNullOrWhiteSpace(model) &&
|
||||
!string.IsNullOrWhiteSpace(revision)) xmlFile = manufacturer + "_" + model + "_" + revision + ".xml";
|
||||
else if(!string.IsNullOrWhiteSpace(manufacturer) && !string.IsNullOrWhiteSpace(model))
|
||||
xmlFile = manufacturer + "_" + model + ".xml";
|
||||
else if(!string.IsNullOrWhiteSpace(model) && !string.IsNullOrWhiteSpace(revision))
|
||||
xmlFile = model + "_" + revision + ".xml";
|
||||
else if(!string.IsNullOrWhiteSpace(model))
|
||||
xmlFile = model + ".xml";
|
||||
else if(!string.IsNullOrWhiteSpace(model)) xmlFile = model + ".xml";
|
||||
|
||||
if(xmlFile==null || !File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
|
||||
if(xmlFile == null ||
|
||||
!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
|
||||
{
|
||||
content.InnerHtml = "<b>Could not find the specified report</b>";
|
||||
return;
|
||||
@@ -83,7 +90,9 @@ namespace DiscImageChef.Server
|
||||
|
||||
DeviceReport report = new DeviceReport();
|
||||
XmlSerializer xs = new XmlSerializer(report.GetType());
|
||||
StreamReader sr = new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports", xmlFile));
|
||||
StreamReader sr =
|
||||
new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports",
|
||||
xmlFile));
|
||||
report = (DeviceReport)xs.Deserialize(sr);
|
||||
sr.Close();
|
||||
|
||||
@@ -91,19 +100,21 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
string usbVendorDescription = null;
|
||||
string usbProductDescription = null;
|
||||
GetUsbDescriptions(report.USB.VendorID, report.USB.ProductID, out usbVendorDescription, out usbProductDescription);
|
||||
GetUsbDescriptions(report.USB.VendorID, report.USB.ProductID, out usbVendorDescription,
|
||||
out usbProductDescription);
|
||||
|
||||
lblUsbManufacturer.Text = HttpUtility.HtmlEncode(report.USB.Manufacturer);
|
||||
lblUsbProduct.Text = HttpUtility.HtmlEncode(report.USB.Product);
|
||||
lblUsbVendor.Text = string.Format("0x{0:x4}", report.USB.VendorID);
|
||||
if(usbVendorDescription != null)
|
||||
lblUsbVendorDescription.Text = string.Format("({0})", HttpUtility.HtmlEncode(usbVendorDescription));
|
||||
lblUsbVendorDescription.Text =
|
||||
string.Format("({0})", HttpUtility.HtmlEncode(usbVendorDescription));
|
||||
lblUsbProductId.Text = string.Format("0x{0:x4}", report.USB.ProductID);
|
||||
if(usbProductDescription != null)
|
||||
lblUsbProductDescription.Text = string.Format("({0})", HttpUtility.HtmlEncode(usbProductDescription));
|
||||
lblUsbProductDescription.Text =
|
||||
string.Format("({0})", HttpUtility.HtmlEncode(usbProductDescription));
|
||||
}
|
||||
else
|
||||
divUsb.Visible = false;
|
||||
else divUsb.Visible = false;
|
||||
|
||||
if(report.FireWire != null)
|
||||
{
|
||||
@@ -112,8 +123,7 @@ namespace DiscImageChef.Server
|
||||
lblFirewireVendor.Text = string.Format("0x{0:x8}", report.FireWire.VendorID);
|
||||
lblFirewireProductId.Text = string.Format("0x{0:x8}", report.FireWire.ProductID);
|
||||
}
|
||||
else
|
||||
divFirewire.Visible = false;
|
||||
else divFirewire.Visible = false;
|
||||
|
||||
if(report.PCMCIA != null)
|
||||
{
|
||||
@@ -133,22 +143,38 @@ namespace DiscImageChef.Server
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_NULL:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_END:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_MANFID:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_VERS_1:
|
||||
break;
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_VERS_1: break;
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICEGEO:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICEGEO_A:
|
||||
Decoders.PCMCIA.DeviceGeometryTuple geom = Decoders.PCMCIA.CIS.DecodeDeviceGeometryTuple(tuple.Data);
|
||||
Decoders.PCMCIA.DeviceGeometryTuple geom =
|
||||
Decoders.PCMCIA.CIS.DecodeDeviceGeometryTuple(tuple.Data);
|
||||
if(geom != null && geom.Geometries != null)
|
||||
{
|
||||
foreach(Decoders.PCMCIA.DeviceGeometry geometry in geom.Geometries)
|
||||
{
|
||||
decodedTuples.Add("Device width", string.Format("{0} bits", (1 << (geometry.CardInterface - 1)) * 8));
|
||||
decodedTuples.Add("Erase block", string.Format("{0} bytes", (1 << (geometry.EraseBlockSize - 1)) * (1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Read block", string.Format("{0} bytes", (1 << (geometry.ReadBlockSize - 1)) * (1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Write block", string.Format("{0} bytes", (1 << (geometry.WriteBlockSize - 1)) * (1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Partition alignment", string.Format("{0} bytes", (1 << (geometry.EraseBlockSize - 1)) * (1 << (geometry.Interleaving - 1)) * (1 << (geometry.Partitions - 1))));
|
||||
decodedTuples.Add("Device width",
|
||||
string.Format("{0} bits",
|
||||
(1 << (geometry.CardInterface - 1)) * 8));
|
||||
decodedTuples.Add("Erase block",
|
||||
string.Format("{0} bytes",
|
||||
(1 << (geometry.EraseBlockSize - 1)) *
|
||||
(1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Read block",
|
||||
string.Format("{0} bytes",
|
||||
(1 << (geometry.ReadBlockSize - 1)) *
|
||||
(1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Write block",
|
||||
string.Format("{0} bytes",
|
||||
(1 << (geometry.WriteBlockSize - 1)) *
|
||||
(1 << (geometry.Interleaving - 1))));
|
||||
decodedTuples.Add("Partition alignment",
|
||||
string.Format("{0} bytes",
|
||||
(1 << (geometry.EraseBlockSize - 1)) *
|
||||
(1 << (geometry.Interleaving - 1)) *
|
||||
(1 << (geometry.Partitions - 1))));
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_ALTSTR:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_BAR:
|
||||
@@ -189,7 +215,6 @@ namespace DiscImageChef.Server
|
||||
default:
|
||||
decodedTuples.Add("Unknown tuple ID", string.Format("0x{0:X2}", (byte)tuple.Code));
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,14 +223,11 @@ namespace DiscImageChef.Server
|
||||
repPcmciaTuples.DataSource = decodedTuples;
|
||||
repPcmciaTuples.DataBind();
|
||||
}
|
||||
else
|
||||
repPcmciaTuples.Visible = false;
|
||||
else repPcmciaTuples.Visible = false;
|
||||
}
|
||||
else
|
||||
repPcmciaTuples.Visible = false;
|
||||
else repPcmciaTuples.Visible = false;
|
||||
}
|
||||
else
|
||||
divPcmcia.Visible = false;
|
||||
else divPcmcia.Visible = false;
|
||||
|
||||
bool removable = true;
|
||||
testedMediaType[] testedMedia = null;
|
||||
@@ -226,17 +248,13 @@ namespace DiscImageChef.Server
|
||||
ataReport = report.ATAPI;
|
||||
atapi = true;
|
||||
}
|
||||
else
|
||||
ataReport = report.ATA;
|
||||
else ataReport = report.ATA;
|
||||
|
||||
bool cfa = report.CompactFlashSpecified && report.CompactFlash;
|
||||
|
||||
if(atapi && !cfa)
|
||||
lblAtaDeviceType.Text = "ATAPI device";
|
||||
else if(!atapi && cfa)
|
||||
lblAtaDeviceType.Text = "CompactFlash device";
|
||||
else
|
||||
lblAtaDeviceType.Text = "ATA device";
|
||||
if(atapi && !cfa) lblAtaDeviceType.Text = "ATAPI device";
|
||||
else if(!atapi && cfa) lblAtaDeviceType.Text = "CompactFlash device";
|
||||
else lblAtaDeviceType.Text = "ATA device";
|
||||
|
||||
Ata.Report(ataReport, cfa, atapi, ref removable, ref ataOneValue, ref ataTwoValue, ref testedMedia);
|
||||
|
||||
@@ -245,8 +263,7 @@ namespace DiscImageChef.Server
|
||||
repAtaTwo.DataSource = ataTwoValue;
|
||||
repAtaTwo.DataBind();
|
||||
}
|
||||
else
|
||||
divAta.Visible = false;
|
||||
else divAta.Visible = false;
|
||||
|
||||
if(report.SCSI != null)
|
||||
{
|
||||
@@ -254,32 +271,31 @@ namespace DiscImageChef.Server
|
||||
Dictionary<string, string> modePages = new Dictionary<string, string>();
|
||||
Dictionary<string, string> evpdPages = new Dictionary<string, string>();
|
||||
|
||||
if(VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification) != report.SCSI.Inquiry.VendorIdentification)
|
||||
lblScsiVendor.Text = string.Format("{0} ({1})", report.SCSI.Inquiry.VendorIdentification, VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification));
|
||||
else
|
||||
lblScsiVendor.Text = report.SCSI.Inquiry.VendorIdentification;
|
||||
if(VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification) !=
|
||||
report.SCSI.Inquiry.VendorIdentification)
|
||||
lblScsiVendor.Text = string.Format("{0} ({1})", report.SCSI.Inquiry.VendorIdentification,
|
||||
VendorString.Prettify(report.SCSI.Inquiry
|
||||
.VendorIdentification));
|
||||
else lblScsiVendor.Text = report.SCSI.Inquiry.VendorIdentification;
|
||||
lblScsiProduct.Text = report.SCSI.Inquiry.ProductIdentification;
|
||||
lblScsiRevision.Text = report.SCSI.Inquiry.ProductRevisionLevel;
|
||||
|
||||
scsiOneValue.AddRange(ScsiInquiry.Report(report.SCSI.Inquiry));
|
||||
|
||||
if(report.SCSI.SupportsModeSense6)
|
||||
scsiOneValue.Add("Device supports MODE SENSE (6)");
|
||||
if(report.SCSI.SupportsModeSense10)
|
||||
scsiOneValue.Add("Device supports MODE SENSE (10)");
|
||||
if(report.SCSI.SupportsModeSubpages)
|
||||
scsiOneValue.Add("Device supports MODE SENSE subpages");
|
||||
if(report.SCSI.SupportsModeSense6) scsiOneValue.Add("Device supports MODE SENSE (6)");
|
||||
if(report.SCSI.SupportsModeSense10) scsiOneValue.Add("Device supports MODE SENSE (10)");
|
||||
if(report.SCSI.SupportsModeSubpages) scsiOneValue.Add("Device supports MODE SENSE subpages");
|
||||
|
||||
if(report.SCSI.ModeSense != null)
|
||||
ScsiModeSense.Report(report.SCSI.ModeSense, report.SCSI.Inquiry.VendorIdentification, report.SCSI.Inquiry.PeripheralDeviceType, ref scsiOneValue, ref modePages);
|
||||
ScsiModeSense.Report(report.SCSI.ModeSense, report.SCSI.Inquiry.VendorIdentification,
|
||||
report.SCSI.Inquiry.PeripheralDeviceType, ref scsiOneValue, ref modePages);
|
||||
|
||||
if(modePages.Count > 0)
|
||||
{
|
||||
repModeSense.DataSource = modePages;
|
||||
repModeSense.DataBind();
|
||||
}
|
||||
else
|
||||
divScsiModeSense.Visible = false;
|
||||
else divScsiModeSense.Visible = false;
|
||||
|
||||
if(report.SCSI.EVPDPages != null)
|
||||
ScsiEvpd.Report(report.SCSI.EVPDPages, report.SCSI.Inquiry.VendorIdentification, ref evpdPages);
|
||||
@@ -289,8 +305,7 @@ namespace DiscImageChef.Server
|
||||
repEvpd.DataSource = evpdPages;
|
||||
repEvpd.DataBind();
|
||||
}
|
||||
else
|
||||
divScsiEvpd.Visible = false;
|
||||
else divScsiEvpd.Visible = false;
|
||||
|
||||
divScsiMmcMode.Visible = false;
|
||||
divScsiMmcFeatures.Visible = false;
|
||||
@@ -330,84 +345,107 @@ namespace DiscImageChef.Server
|
||||
|
||||
if(report.SCSI.SequentialDevice.BlockSizeGranularitySpecified)
|
||||
lblScsiSscGranularity.Text = report.SCSI.SequentialDevice.BlockSizeGranularity.ToString();
|
||||
else
|
||||
lblScsiSscGranularity.Text = "Unspecified";
|
||||
|
||||
else lblScsiSscGranularity.Text = "Unspecified";
|
||||
|
||||
if(report.SCSI.SequentialDevice.MaxBlockLengthSpecified)
|
||||
lblScsiSscMaxBlock.Text = report.SCSI.SequentialDevice.MaxBlockLength.ToString();
|
||||
else
|
||||
lblScsiSscMaxBlock.Text = "Unspecified";
|
||||
|
||||
else lblScsiSscMaxBlock.Text = "Unspecified";
|
||||
|
||||
if(report.SCSI.SequentialDevice.MinBlockLengthSpecified)
|
||||
lblScsiSscMinBlock.Text = report.SCSI.SequentialDevice.MinBlockLength.ToString();
|
||||
else
|
||||
lblScsiSscMinBlock.Text = "Unspecified";
|
||||
else lblScsiSscMinBlock.Text = "Unspecified";
|
||||
|
||||
if(report.SCSI.SequentialDevice.SupportedDensities != null)
|
||||
{
|
||||
repScsiSscDensities.DataSource = report.SCSI.SequentialDevice.SupportedDensities;
|
||||
repScsiSscDensities.DataBind();
|
||||
}
|
||||
else
|
||||
repScsiSscDensities.Visible = false;
|
||||
else repScsiSscDensities.Visible = false;
|
||||
|
||||
if(report.SCSI.SequentialDevice.SupportedMediaTypes != null)
|
||||
{
|
||||
repScsiSscMedias.DataSource = report.SCSI.SequentialDevice.SupportedMediaTypes;
|
||||
repScsiSscMedias.DataBind();
|
||||
}
|
||||
else
|
||||
repScsiSscMedias.Visible = false;
|
||||
else repScsiSscMedias.Visible = false;
|
||||
|
||||
if(report.SCSI.SequentialDevice.TestedMedia != null)
|
||||
{
|
||||
List<string> mediaOneValue = new List<string>();
|
||||
SscTestedMedia.Report(report.SCSI.SequentialDevice.TestedMedia, ref mediaOneValue);
|
||||
if(mediaOneValue.Count>0)
|
||||
if(mediaOneValue.Count > 0)
|
||||
{
|
||||
sscMedia = true;
|
||||
repTestedMedia.DataSource = mediaOneValue;
|
||||
repTestedMedia.DataBind();
|
||||
}
|
||||
else
|
||||
divTestedMedia.Visible = false;
|
||||
else divTestedMedia.Visible = false;
|
||||
}
|
||||
else
|
||||
divTestedMedia.Visible = false;
|
||||
else divTestedMedia.Visible = false;
|
||||
}
|
||||
else if(report.SCSI.ReadCapabilities != null)
|
||||
{
|
||||
removable = false;
|
||||
scsiOneValue.Add("");
|
||||
|
||||
if(report.SCSI.ReadCapabilities.BlocksSpecified && report.SCSI.ReadCapabilities.BlockSizeSpecified)
|
||||
if(report.SCSI.ReadCapabilities.BlocksSpecified &&
|
||||
report.SCSI.ReadCapabilities.BlockSizeSpecified)
|
||||
{
|
||||
scsiOneValue.Add(string.Format("Device has {0} blocks of {1} bytes each", report.SCSI.ReadCapabilities.Blocks, report.SCSI.ReadCapabilities.BlockSize));
|
||||
scsiOneValue.Add(string.Format("Device has {0} blocks of {1} bytes each",
|
||||
report.SCSI.ReadCapabilities.Blocks,
|
||||
report.SCSI.ReadCapabilities.BlockSize));
|
||||
|
||||
if(((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024) > 1000000)
|
||||
if(((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024) > 1000000)
|
||||
{
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Tb, {2:F2} TiB", report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 / 1000 / 1000, (double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024 / 1024));
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Tb, {2:F2} TiB",
|
||||
report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 /
|
||||
1000 / 1000,
|
||||
(double)(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024 / 1024 / 1024));
|
||||
}
|
||||
else if(((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024) > 1000)
|
||||
else if(
|
||||
((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024) > 1000)
|
||||
{
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Gb, {2:F2} GiB", report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 / 1000, (double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024));
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Gb, {2:F2} GiB",
|
||||
report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 /
|
||||
1000,
|
||||
(double)(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024 / 1024));
|
||||
}
|
||||
else
|
||||
{
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Mb, {2:F2} MiB", report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000, (double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024));
|
||||
scsiOneValue.Add(string.Format("Device size: {0} bytes, {1} Mb, {2:F2} MiB",
|
||||
report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize,
|
||||
(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000,
|
||||
(double)(report.SCSI.ReadCapabilities.Blocks *
|
||||
report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024));
|
||||
}
|
||||
}
|
||||
|
||||
if(report.SCSI.ReadCapabilities.MediumTypeSpecified)
|
||||
scsiOneValue.Add(string.Format("Medium type code: {0:X2}h", report.SCSI.ReadCapabilities.MediumType));
|
||||
scsiOneValue.Add(string.Format("Medium type code: {0:X2}h",
|
||||
report.SCSI.ReadCapabilities.MediumType));
|
||||
if(report.SCSI.ReadCapabilities.DensitySpecified)
|
||||
scsiOneValue.Add(string.Format("Density code: {0:X2}h", report.SCSI.ReadCapabilities.Density));
|
||||
if((report.SCSI.ReadCapabilities.SupportsReadLong || report.SCSI.ReadCapabilities.SupportsReadLong16) &&
|
||||
scsiOneValue.Add(string.Format("Density code: {0:X2}h",
|
||||
report.SCSI.ReadCapabilities.Density));
|
||||
if((report.SCSI.ReadCapabilities.SupportsReadLong ||
|
||||
report.SCSI.ReadCapabilities.SupportsReadLong16) &&
|
||||
report.SCSI.ReadCapabilities.LongBlockSizeSpecified)
|
||||
scsiOneValue.Add(string.Format("Long block size: {0} bytes", report.SCSI.ReadCapabilities.LongBlockSize));
|
||||
scsiOneValue.Add(string.Format("Long block size: {0} bytes",
|
||||
report.SCSI.ReadCapabilities.LongBlockSize));
|
||||
if(report.SCSI.ReadCapabilities.SupportsReadCapacity)
|
||||
scsiOneValue.Add("Device supports READ CAPACITY (10) command.");
|
||||
if(report.SCSI.ReadCapabilities.SupportsReadCapacity16)
|
||||
@@ -425,14 +463,12 @@ namespace DiscImageChef.Server
|
||||
if(report.SCSI.ReadCapabilities.SupportsReadLong16)
|
||||
scsiOneValue.Add("Device supports READ LONG (16) command.");
|
||||
}
|
||||
else
|
||||
testedMedia = report.SCSI.RemovableMedias;
|
||||
else testedMedia = report.SCSI.RemovableMedias;
|
||||
|
||||
repScsi.DataSource = scsiOneValue;
|
||||
repScsi.DataBind();
|
||||
}
|
||||
else
|
||||
divScsi.Visible = false;
|
||||
else divScsi.Visible = false;
|
||||
|
||||
if(report.MultiMediaCard != null)
|
||||
{
|
||||
@@ -440,33 +476,36 @@ namespace DiscImageChef.Server
|
||||
|
||||
if(report.MultiMediaCard.CID != null)
|
||||
{
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCID(report.MultiMediaCard.CID).Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCID(report.MultiMediaCard.CID)
|
||||
.Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.MultiMediaCard.CSD != null)
|
||||
{
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.CSD).Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.CSD)
|
||||
.Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.MultiMediaCard.ExtendedCSD != null)
|
||||
{
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyExtendedCSD(report.MultiMediaCard.ExtendedCSD).Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyExtendedCSD(report.MultiMediaCard.ExtendedCSD)
|
||||
.Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.MultiMediaCard.OCR != null)
|
||||
{
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.OCR).Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add(Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.OCR)
|
||||
.Replace("\n", "<br/>"));
|
||||
mmcOneValue.Add("");
|
||||
}
|
||||
|
||||
repMMC.DataSource = mmcOneValue;
|
||||
repMMC.DataBind();
|
||||
}
|
||||
else
|
||||
divMMC.Visible = false;
|
||||
else divMMC.Visible = false;
|
||||
|
||||
if(report.SecureDigital != null)
|
||||
{
|
||||
@@ -474,35 +513,38 @@ namespace DiscImageChef.Server
|
||||
|
||||
if(report.SecureDigital.CID != null)
|
||||
{
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCID(report.SecureDigital.CID).Replace("\n", "<br/>"));
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCID(report.SecureDigital.CID)
|
||||
.Replace("\n", "<br/>"));
|
||||
sdOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.CSD != null)
|
||||
{
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.CSD).Replace("\n", "<br/>"));
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.CSD)
|
||||
.Replace("\n", "<br/>"));
|
||||
sdOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.SCR != null)
|
||||
{
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifySCR(report.SecureDigital.SCR).Replace("\n", "<br/>"));
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifySCR(report.SecureDigital.SCR)
|
||||
.Replace("\n", "<br/>"));
|
||||
sdOneValue.Add("");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.OCR != null)
|
||||
{
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.OCR).Replace("\n", "<br/>"));
|
||||
sdOneValue.Add(Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.OCR)
|
||||
.Replace("\n", "<br/>"));
|
||||
sdOneValue.Add("");
|
||||
}
|
||||
|
||||
repSD.DataSource = sdOneValue;
|
||||
repSD.DataBind();
|
||||
}
|
||||
else
|
||||
divSD.Visible = false;
|
||||
else divSD.Visible = false;
|
||||
|
||||
if(removable && !sscMedia && testedMedia!=null)
|
||||
if(removable && !sscMedia && testedMedia != null)
|
||||
{
|
||||
List<string> mediaOneValue = new List<string>();
|
||||
TestedMedia.Report(testedMedia, ata, ref mediaOneValue);
|
||||
@@ -512,8 +554,7 @@ namespace DiscImageChef.Server
|
||||
repTestedMedia.DataSource = mediaOneValue;
|
||||
repTestedMedia.DataBind();
|
||||
}
|
||||
else
|
||||
divTestedMedia.Visible = false;
|
||||
else divTestedMedia.Visible = false;
|
||||
}
|
||||
else divTestedMedia.Visible &= sscMedia;
|
||||
}
|
||||
@@ -526,15 +567,16 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
}
|
||||
|
||||
static void GetUsbDescriptions(ushort vendor, ushort product, out string vendorDescription, out string productDescription)
|
||||
static void GetUsbDescriptions(ushort vendor, ushort product, out string vendorDescription,
|
||||
out string productDescription)
|
||||
{
|
||||
vendorDescription = null;
|
||||
productDescription = null;
|
||||
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids")))
|
||||
return;
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids"))) return;
|
||||
|
||||
StreamReader tocStream = new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids"));
|
||||
StreamReader tocStream =
|
||||
new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids"));
|
||||
string _line;
|
||||
bool inManufacturer = false;
|
||||
ushort number;
|
||||
@@ -543,14 +585,12 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
_line = tocStream.ReadLine();
|
||||
|
||||
if(_line.Length == 0 || _line[0] == '#')
|
||||
continue;
|
||||
if(_line.Length == 0 || _line[0] == '#') continue;
|
||||
|
||||
if(inManufacturer)
|
||||
{
|
||||
// Finished with the manufacturer
|
||||
if(_line[0] != '\t')
|
||||
return;
|
||||
if(_line[0] != '\t') return;
|
||||
|
||||
number = Convert.ToUInt16(_line.Substring(1, 4), 16);
|
||||
|
||||
@@ -563,17 +603,10 @@ namespace DiscImageChef.Server
|
||||
else
|
||||
{
|
||||
// Skip products
|
||||
if(_line[0] == '\t')
|
||||
continue;
|
||||
if(_line[0] == '\t') continue;
|
||||
|
||||
try
|
||||
{
|
||||
number = Convert.ToUInt16(_line.Substring(0, 4), 16);
|
||||
}
|
||||
catch(FormatException)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try { number = Convert.ToUInt16(_line.Substring(0, 4), 16); }
|
||||
catch(FormatException) { continue; }
|
||||
|
||||
if(number == vendor)
|
||||
{
|
||||
@@ -584,4 +617,4 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Web.config file for DiscImageChef.Server.
|
||||
|
||||
@@ -7,15 +8,15 @@ http://www.mono-project.com/Config_system.web and
|
||||
http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
-->
|
||||
<configuration>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5">
|
||||
<assemblies />
|
||||
</compilation>
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
</system.web>
|
||||
<pages>
|
||||
<controls>
|
||||
<add assembly="Velyo.AspNet.Markdown" namespace="Velyo.AspNet.Markdown" tagPrefix="velyo" />
|
||||
</controls>
|
||||
</pages>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5">
|
||||
<assemblies />
|
||||
</compilation>
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
</system.web>
|
||||
<pages>
|
||||
<controls>
|
||||
<add assembly="Velyo.AspNet.Markdown" namespace="Velyo.AspNet.Markdown" tagPrefix="velyo" />
|
||||
</controls>
|
||||
</pages>
|
||||
</configuration>
|
||||
@@ -1,117 +1,132 @@
|
||||
@font-face {
|
||||
font-family: 'VGAsquarePx';
|
||||
src: url(int10h.org/vga_squarepx.eot);
|
||||
src: url(int10h.org/vga_squarepx.eot?#iefix) format('embedded-opentype'),
|
||||
url(int10h.org/vga_squarepx.woff2) format('woff2'),
|
||||
url(int10h.org/vga_squarepx.woff) format('woff'),
|
||||
url(int10h.org/vga_squarepx.ttf) format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-family: 'VGAsquarePx';
|
||||
src: url(int10h.org/vga_squarepx.eot);
|
||||
src: url(int10h.org/vga_squarepx.eot?#iefix) format('embedded-opentype'),
|
||||
url(int10h.org/vga_squarepx.woff2) format('woff2'),
|
||||
url(int10h.org/vga_squarepx.woff) format('woff'),
|
||||
url(int10h.org/vga_squarepx.ttf) format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* define a black "stipple" background with DOS font */
|
||||
|
||||
body {
|
||||
background:
|
||||
radial-gradient(black 15%, transparent 16%) 0 0,
|
||||
radial-gradient(black 15%, transparent 16%) 8px 8px,
|
||||
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
|
||||
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
|
||||
background-color:#282828;
|
||||
background-size:16px 16px;
|
||||
color: #aaa;
|
||||
font-family: 'VGAsquarePx', serif;
|
||||
font-size: 20pt;
|
||||
margin: 0;
|
||||
background:
|
||||
radial-gradient(black 15%, transparent 16%) 0 0,
|
||||
radial-gradient(black 15%, transparent 16%) 8px 8px,
|
||||
radial-gradient(rgba(255, 255, 255, .1) 15%, transparent 20%) 0 1px,
|
||||
radial-gradient(rgba(255, 255, 255, .1) 15%, transparent 20%) 8px 9px;
|
||||
background-color: #282828;
|
||||
background-size: 16px 16px;
|
||||
color: #aaa;
|
||||
font-family: 'VGAsquarePx', serif;
|
||||
font-size: 20pt;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* links are cyan, hover is bright yellow */
|
||||
|
||||
a {
|
||||
color: #0aa;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #ff5;
|
||||
color: #0aa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover { color: #ff5; }
|
||||
|
||||
/* headings and bold text are bright white */
|
||||
h1,h2,h3,h4,
|
||||
|
||||
h1, h2, h3, h4,
|
||||
b, strong {
|
||||
color: #fff;
|
||||
font-size: 1em;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-size: 1em;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* italic text is green */
|
||||
|
||||
em, i {
|
||||
color: #0a0;
|
||||
font-style: normal;
|
||||
color: #0a0;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* define content areas */
|
||||
|
||||
header, main, footer {
|
||||
margin: 0 auto;
|
||||
padding: 1em 0;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 1em 0;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
/* use black on cyan text for header */
|
||||
|
||||
header {
|
||||
background-color: #0aa;
|
||||
color: #000;
|
||||
background-color: #0aa;
|
||||
color: #000;
|
||||
}
|
||||
/* insert the "April 1st" text */
|
||||
header > h1::before {
|
||||
content: "Today is April 1, 2017!";
|
||||
}
|
||||
header > h1 img {
|
||||
|
||||
/* insert the "April 1st" text */
|
||||
|
||||
header > h1::before { content: "Today is April 1, 2017!"; }
|
||||
|
||||
header > h1 img {
|
||||
display: block;
|
||||
width: 300px;
|
||||
}
|
||||
header > form {
|
||||
}
|
||||
header > form fieldset {
|
||||
border: none;
|
||||
}
|
||||
/* use black on gray for navigation */
|
||||
nav {
|
||||
}
|
||||
|
||||
header > form { }
|
||||
|
||||
header > form fieldset { border: none; }
|
||||
|
||||
/* use black on gray for navigation */
|
||||
|
||||
nav {
|
||||
background-color: #aaa;
|
||||
color: #000;
|
||||
}
|
||||
nav a {
|
||||
color: #000;
|
||||
}
|
||||
nav img {
|
||||
display: none;
|
||||
}
|
||||
nav span {
|
||||
}
|
||||
nav > ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
nav > ul li {
|
||||
display: inline;
|
||||
margin: 0 .5em;
|
||||
}
|
||||
}
|
||||
|
||||
nav a { color: #000; }
|
||||
|
||||
nav img { display: none; }
|
||||
|
||||
nav span { }
|
||||
|
||||
nav > ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
nav > ul li {
|
||||
display: inline;
|
||||
margin: 0 .5em;
|
||||
}
|
||||
|
||||
/* use white on blue for main text */
|
||||
|
||||
main {
|
||||
background-color: #00a;
|
||||
color: #aaa;
|
||||
background-color: #00a;
|
||||
color: #aaa;
|
||||
}
|
||||
main > nav {
|
||||
}
|
||||
main > nav li::before {
|
||||
content: ">";
|
||||
}
|
||||
main > section {
|
||||
}
|
||||
main div.third img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
main > nav { }
|
||||
|
||||
main > nav li::before { content: ">"; }
|
||||
|
||||
main > section { }
|
||||
|
||||
main div.third img { display: block; }
|
||||
|
||||
/* use black on brown text for footer */
|
||||
|
||||
footer {
|
||||
background-color: #a50;
|
||||
color: #000;
|
||||
background-color: #a50;
|
||||
color: #000;
|
||||
}
|
||||
footer > nav {
|
||||
}
|
||||
footer > section {
|
||||
}
|
||||
|
||||
footer > nav { }
|
||||
|
||||
footer > section { }
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net461" />
|
||||
<package id="Velyo.AspNet.Markdown" version="1.0.26.6184" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net461" />
|
||||
<package id="Velyo.AspNet.Markdown" version="1.0.26.6184" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user