mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Remove unneeded code.
This commit is contained in:
@@ -360,69 +360,69 @@ namespace DiscImageChef.Server.App_Start
|
||||
if(atapi && ataReport.GeneralConfigurationSpecified)
|
||||
{
|
||||
// Bits 12 to 8, SCSI Peripheral Device Type
|
||||
switch((Decoders.SCSI.PeripheralDeviceTypes)(((ushort)ataReport.GeneralConfiguration & 0x1F00) >> 8))
|
||||
switch((PeripheralDeviceTypes)(((ushort)ataReport.GeneralConfiguration & 0x1F00) >> 8))
|
||||
{
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.DirectAccess: //0x00,
|
||||
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
||||
ataOneValue.Add("ATAPI Direct-access device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess: //0x01,
|
||||
case PeripheralDeviceTypes.SequentialAccess: //0x01,
|
||||
ataOneValue.Add("ATAPI Sequential-access device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.PrinterDevice: //0x02,
|
||||
case PeripheralDeviceTypes.PrinterDevice: //0x02,
|
||||
ataOneValue.Add("ATAPI Printer device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.ProcessorDevice: //0x03,
|
||||
case PeripheralDeviceTypes.ProcessorDevice: //0x03,
|
||||
ataOneValue.Add("ATAPI Processor device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.WriteOnceDevice: //0x04,
|
||||
case PeripheralDeviceTypes.WriteOnceDevice: //0x04,
|
||||
ataOneValue.Add("ATAPI Write-once device");
|
||||
break;
|
||||
case PeripheralDeviceTypes.MultiMediaDevice: //0x05,
|
||||
ataOneValue.Add("ATAPI CD-ROM/DVD/etc device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.ScannerDevice: //0x06,
|
||||
case PeripheralDeviceTypes.ScannerDevice: //0x06,
|
||||
ataOneValue.Add("ATAPI Scanner device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.OpticalDevice: //0x07,
|
||||
case PeripheralDeviceTypes.OpticalDevice: //0x07,
|
||||
ataOneValue.Add("ATAPI Optical memory device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.MediumChangerDevice: //0x08,
|
||||
case PeripheralDeviceTypes.MediumChangerDevice: //0x08,
|
||||
ataOneValue.Add("ATAPI Medium change device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.CommsDevice: //0x09,
|
||||
case PeripheralDeviceTypes.CommsDevice: //0x09,
|
||||
ataOneValue.Add("ATAPI Communications device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.PrePressDevice1: //0x0A,
|
||||
case PeripheralDeviceTypes.PrePressDevice1: //0x0A,
|
||||
ataOneValue.Add("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.PrePressDevice2: //0x0B,
|
||||
case PeripheralDeviceTypes.PrePressDevice2: //0x0B,
|
||||
ataOneValue.Add("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.ArrayControllerDevice: //0x0C,
|
||||
case PeripheralDeviceTypes.ArrayControllerDevice: //0x0C,
|
||||
ataOneValue.Add("ATAPI Array controller device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.EnclosureServiceDevice: //0x0D,
|
||||
case PeripheralDeviceTypes.EnclosureServiceDevice: //0x0D,
|
||||
ataOneValue.Add("ATAPI Enclosure services device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.SimplifiedDevice: //0x0E,
|
||||
case PeripheralDeviceTypes.SimplifiedDevice: //0x0E,
|
||||
ataOneValue.Add("ATAPI Simplified direct-access device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.OCRWDevice: //0x0F,
|
||||
case PeripheralDeviceTypes.OCRWDevice: //0x0F,
|
||||
ataOneValue.Add("ATAPI Optical card reader/writer device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.BridgingExpander: //0x10,
|
||||
case PeripheralDeviceTypes.BridgingExpander: //0x10,
|
||||
ataOneValue.Add("ATAPI Bridging Expanders");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.ObjectDevice: //0x11,
|
||||
case PeripheralDeviceTypes.ObjectDevice: //0x11,
|
||||
ataOneValue.Add("ATAPI Object-based Storage Device");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.ADCDevice: //0x12,
|
||||
case PeripheralDeviceTypes.ADCDevice: //0x12,
|
||||
ataOneValue.Add("ATAPI Automation/Drive Interface");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.WellKnownDevice: //0x1E,
|
||||
case PeripheralDeviceTypes.WellKnownDevice: //0x1E,
|
||||
ataOneValue.Add("ATAPI Well known logical unit");
|
||||
break;
|
||||
case Decoders.SCSI.PeripheralDeviceTypes.UnknownDevice: //0x1F
|
||||
case PeripheralDeviceTypes.UnknownDevice: //0x1F
|
||||
ataOneValue.Add("ATAPI Unknown or no device type");
|
||||
break;
|
||||
default:
|
||||
@@ -818,25 +818,25 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
if(!ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Clear))
|
||||
{
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen1Speed)) ataOneValue.Add(string.Format("SATA 1.5Gb/s is supported"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen2Speed)) ataOneValue.Add(string.Format("SATA 3.0Gb/s is supported"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen3Speed)) ataOneValue.Add(string.Format("SATA 6.0Gb/s is supported"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen1Speed)) ataOneValue.Add("SATA 1.5Gb/s is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen2Speed)) ataOneValue.Add("SATA 3.0Gb/s is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Gen3Speed)) ataOneValue.Add("SATA 6.0Gb/s is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.PowerReceipt))
|
||||
ataOneValue
|
||||
.Add(string.Format("Receipt of host initiated power management requests is supported"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.PHYEventCounter)) ataOneValue.Add(string.Format("PHY Event counters are supported"));
|
||||
.Add("Receipt of host initiated power management requests is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.PHYEventCounter)) ataOneValue.Add("PHY Event counters are supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.HostSlumbTrans))
|
||||
ataOneValue
|
||||
.Add(string.Format("Supports host automatic partial to slumber transitions is supported"));
|
||||
.Add("Supports host automatic partial to slumber transitions is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.DevSlumbTrans))
|
||||
ataOneValue
|
||||
.Add(string.Format("Supports device automatic partial to slumber transitions is supported"));
|
||||
.Add("Supports device automatic partial to slumber transitions is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQ))
|
||||
{
|
||||
ataOneValue.Add(string.Format("NCQ is supported"));
|
||||
ataOneValue.Add("NCQ is supported");
|
||||
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQPriority)) ataOneValue.Add(string.Format("NCQ priority is supported"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.UnloadNCQ)) ataOneValue.Add(string.Format("Unload is supported with outstanding NCQ commands"));
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQPriority)) ataOneValue.Add("NCQ priority is supported");
|
||||
if(ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.UnloadNCQ)) ataOneValue.Add("Unload is supported with outstanding NCQ commands");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,16 +847,16 @@ namespace DiscImageChef.Server.App_Start
|
||||
!ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.Clear) &&
|
||||
ataReport.SATACapabilities.HasFlag(SATACapabilitiesBit.NCQ))
|
||||
{
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQMgmt)) ataOneValue.Add(string.Format("NCQ queue management is supported"));
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQStream)) ataOneValue.Add(string.Format("NCQ streaming is supported"));
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQMgmt)) ataOneValue.Add("NCQ queue management is supported");
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.NCQStream)) ataOneValue.Add("NCQ streaming is supported");
|
||||
}
|
||||
|
||||
if(ataReport.SATACapabilities2Specified && atapi)
|
||||
{
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.HostEnvDetect)) ataOneValue.Add(string.Format("ATAPI device supports host environment detection"));
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.HostEnvDetect)) ataOneValue.Add("ATAPI device supports host environment detection");
|
||||
if(ataReport.SATACapabilities2.HasFlag(SATACapabilitiesBit2.DevAttSlimline))
|
||||
ataOneValue
|
||||
.Add(string.Format("ATAPI device supports attention on slimline connected devices"));
|
||||
.Add("ATAPI device supports attention on slimline connected devices");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Metadata;
|
||||
|
||||
namespace DiscImageChef.Server.App_Start
|
||||
@@ -42,38 +43,38 @@ 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 = EVPD.DecodeASCIIPage(evpd.value);
|
||||
else if(evpd.page == 0x81) decoded = EVPD.PrettifyPage_81(evpd.value);
|
||||
else if(evpd.page == 0x82) decoded = EVPD.DecodePage82(evpd.value);
|
||||
else if(evpd.page == 0x83) decoded = EVPD.PrettifyPage_83(evpd.value);
|
||||
else if(evpd.page == 0x84) decoded = EVPD.PrettifyPage_84(evpd.value);
|
||||
else if(evpd.page == 0x85) decoded = EVPD.PrettifyPage_85(evpd.value);
|
||||
else if(evpd.page == 0x86) decoded = EVPD.PrettifyPage_86(evpd.value);
|
||||
else if(evpd.page == 0x89) decoded = EVPD.PrettifyPage_89(evpd.value);
|
||||
else if(evpd.page == 0xB0) decoded = EVPD.PrettifyPage_B0(evpd.value);
|
||||
else if(evpd.page == 0xB2)
|
||||
decoded = 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);
|
||||
EVPD.DecodePageB2(evpd.value));
|
||||
else if(evpd.page == 0xB4) decoded = EVPD.DecodePageB4(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "quantum")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_Quantum(evpd.value);
|
||||
decoded = EVPD.PrettifyPage_C0_Quantum(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "seagate")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_Seagate(evpd.value);
|
||||
decoded = EVPD.PrettifyPage_C0_Seagate(evpd.value);
|
||||
else if(evpd.page == 0xC0 && vendor.Trim() == "ibm")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_IBM(evpd.value);
|
||||
decoded = EVPD.PrettifyPage_C0_IBM(evpd.value);
|
||||
else if(evpd.page == 0xC1 && vendor.Trim() == "ibm")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C1_IBM(evpd.value);
|
||||
decoded = 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);
|
||||
decoded = EVPD.PrettifyPage_C0_C1_Certance(evpd.value);
|
||||
else if((evpd.page == 0xC2 || evpd.page == 0xC3 || evpd.page == 0xC4 || evpd.page == 0xC5 ||
|
||||
evpd.page == 0xC6) &&
|
||||
vendor.Trim() == "certance")
|
||||
decoded = Decoders.SCSI.EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(evpd.value);
|
||||
decoded = EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(evpd.value);
|
||||
else if((evpd.page == 0xC0 || evpd.page == 0xC1 || evpd.page == 0xC2 || evpd.page == 0xC3 ||
|
||||
evpd.page == 0xC4 || evpd.page == 0xC5) &&
|
||||
vendor.Trim() == "hp") decoded = Decoders.SCSI.EVPD.PrettifyPage_C0_to_C5_HP(evpd.value);
|
||||
vendor.Trim() == "hp") decoded = 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);
|
||||
decoded = EVPD.PrettifyPage_DF_Certance(evpd.value);
|
||||
else decoded = "Undecoded";
|
||||
|
||||
if(!string.IsNullOrEmpty(decoded)) decoded = decoded.Replace("\n", "<br/>");
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
{
|
||||
List<string> scsiOneValue = new List<string>();
|
||||
|
||||
switch((PeripheralQualifiers)inquiry.PeripheralQualifier)
|
||||
switch(inquiry.PeripheralQualifier)
|
||||
{
|
||||
case PeripheralQualifiers.Supported:
|
||||
scsiOneValue.Add("Device is connected and supported.");
|
||||
@@ -62,7 +62,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
break;
|
||||
}
|
||||
|
||||
switch((PeripheralDeviceTypes)inquiry.PeripheralDeviceType)
|
||||
switch(inquiry.PeripheralDeviceType)
|
||||
{
|
||||
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
||||
scsiOneValue.Add("Direct-access device");
|
||||
@@ -227,7 +227,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
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)
|
||||
switch(inquiry.AsymmetricalLUNAccess)
|
||||
{
|
||||
case TGPSValues.NotSupported:
|
||||
scsiOneValue.Add("Device does not support assymetrical access");
|
||||
@@ -247,7 +247,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
break;
|
||||
}
|
||||
|
||||
switch((SPIClocking)inquiry.SPIClocking)
|
||||
switch(inquiry.SPIClocking)
|
||||
{
|
||||
case SPIClocking.ST:
|
||||
scsiOneValue.Add("Device supports only ST clocking");
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace DiscImageChef.Server.App_Start
|
||||
case 0x10:
|
||||
{
|
||||
if(page.subpage == 0)
|
||||
if(deviceType == Decoders.SCSI.PeripheralDeviceTypes.SequentialAccess)
|
||||
if(deviceType == PeripheralDeviceTypes.SequentialAccess)
|
||||
modePages.Add(string.Format("MODE page {0:X2}h", page.page),
|
||||
Modes.PrettifyModePage_10_SSC(page.value));
|
||||
else
|
||||
|
||||
@@ -32,8 +32,11 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.Http;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.Metadata;
|
||||
@@ -47,7 +50,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
public HttpResponseMessage UploadReport()
|
||||
{
|
||||
HttpResponseMessage response = new HttpResponseMessage();
|
||||
response.StatusCode = System.Net.HttpStatusCode.OK;
|
||||
response.StatusCode = HttpStatusCode.OK;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -56,7 +59,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(request.InputStream == null)
|
||||
{
|
||||
response.Content = new StringContent("notstats", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -65,21 +68,21 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(newReport == null)
|
||||
{
|
||||
response.Content = new StringContent("notstats", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
|
||||
Random rng = new Random();
|
||||
string filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
while(File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Upload", filename))) filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
while(File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Upload", filename))) 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),
|
||||
new FileStream(Path.Combine(HostingEnvironment.MapPath("~"), "Upload", filename),
|
||||
FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
xs.Serialize(newFile, newReport);
|
||||
newFile.Close();
|
||||
|
||||
response.Content = new StringContent("ok", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
// ReSharper disable once RedundantCatchClause
|
||||
|
||||
@@ -31,10 +31,15 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.Http;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.Metadata;
|
||||
@@ -48,7 +53,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
public HttpResponseMessage UploadStats()
|
||||
{
|
||||
HttpResponseMessage response = new HttpResponseMessage();
|
||||
response.StatusCode = System.Net.HttpStatusCode.OK;
|
||||
response.StatusCode = HttpStatusCode.OK;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -57,7 +62,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(request.InputStream == null)
|
||||
{
|
||||
response.Content = new StringContent("notstats", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -66,17 +71,17 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(newStats == null)
|
||||
{
|
||||
response.Content = new StringContent("notstats", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
|
||||
FileStream fs =
|
||||
WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
FileMode.Open, FileAccess.ReadWrite, FileShare.None);
|
||||
|
||||
if(fs == null)
|
||||
{
|
||||
response.Content = new StringContent("retry", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("retry", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -139,7 +144,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldStats.OperatingSystems == null)
|
||||
oldStats.OperatingSystems =
|
||||
new System.Collections.Generic.List<OsStats> {new OsStats {name = "Linux", Value = 1}};
|
||||
new List<OsStats> {new OsStats {name = "Linux", Value = 1}};
|
||||
else
|
||||
{
|
||||
OsStats removeNvs = null;
|
||||
@@ -194,7 +199,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
{
|
||||
if(oldStats.Versions == null)
|
||||
oldStats.Versions =
|
||||
new System.Collections.Generic.List<NameValueStats>
|
||||
new List<NameValueStats>
|
||||
{
|
||||
new NameValueStats {name = "previous", Value = 1}
|
||||
};
|
||||
@@ -418,13 +423,13 @@ namespace DiscImageChef.Server.Controllers
|
||||
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",
|
||||
while(File.Exists(Path.Combine(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),
|
||||
FileStream(Path.Combine(HostingEnvironment.MapPath("~"), "Statistics", filename),
|
||||
FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
fs.Seek(0, SeekOrigin.Begin);
|
||||
fs.CopyTo(backup);
|
||||
@@ -435,13 +440,13 @@ namespace DiscImageChef.Server.Controllers
|
||||
fs.SetLength(fs.Position);
|
||||
fs.Close();
|
||||
|
||||
response.Content = new StringContent("ok", System.Text.Encoding.UTF8, "text/plain");
|
||||
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
#if DEBUG
|
||||
System.Console.WriteLine("{0} {1}", ex.Message, ex.InnerException);
|
||||
Console.WriteLine("{0} {1}", ex.Message, ex.InnerException);
|
||||
throw;
|
||||
#else
|
||||
response.Content = new StringContent("error", System.Text.Encoding.UTF8, "text/plain");
|
||||
@@ -463,7 +468,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
catch(IOException)
|
||||
{
|
||||
if(fs != null) fs.Dispose();
|
||||
System.Threading.Thread.Sleep(50);
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,24 +32,27 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.UI;
|
||||
using Velyo.AspNet.Markdown;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
public partial class Default : System.Web.UI.Page
|
||||
public partial class Default : 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"));
|
||||
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~"), "docs", "README.md"));
|
||||
string mdcontent = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
|
||||
mkdown.Content = mdcontent.Replace(".md)", ".aspx)");
|
||||
body.Controls.Add(mkdown);
|
||||
|
||||
lblVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
lblVersion.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
7
DiscImageChef.Server/Default.aspx.designer.cs
generated
7
DiscImageChef.Server/Default.aspx.designer.cs
generated
@@ -8,13 +8,16 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DiscImageChef.Server {
|
||||
|
||||
|
||||
public partial class Default {
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl body;
|
||||
protected HtmlGenericControl body;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblVersion;
|
||||
protected Label lblVersion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,13 +35,18 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.UI;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.Interop;
|
||||
using DiscImageChef.Metadata;
|
||||
using PlatformID = DiscImageChef.Interop.PlatformID;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
public partial class Statistics : System.Web.UI.Page
|
||||
public partial class Statistics : Page
|
||||
{
|
||||
class MediaItem
|
||||
{
|
||||
@@ -72,12 +77,12 @@ namespace DiscImageChef.Server
|
||||
|
||||
try
|
||||
{
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics",
|
||||
if(!File.Exists(Path.Combine(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("~"),
|
||||
Path.Combine(HostingEnvironment.MapPath("~"),
|
||||
"Statistics", "Statistics.xml"));
|
||||
#else
|
||||
content.InnerHtml = "<b>Sorry, cannot load data file</b>";
|
||||
@@ -89,7 +94,7 @@ namespace DiscImageChef.Server
|
||||
|
||||
XmlSerializer xs = new XmlSerializer(statistics.GetType());
|
||||
FileStream fs =
|
||||
WaitForFile(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
statistics = (Stats)xs.Deserialize(fs);
|
||||
fs.Close();
|
||||
@@ -101,8 +106,8 @@ namespace DiscImageChef.Server
|
||||
operatingSystems.Add(new NameValueStats
|
||||
{
|
||||
name = string.Format("{0}{1}{2}",
|
||||
Interop.DetectOS
|
||||
.GetPlatformName((Interop.PlatformID)Enum.Parse(typeof(Interop.PlatformID), nvs.name),
|
||||
DetectOS
|
||||
.GetPlatformName((PlatformID)Enum.Parse(typeof(PlatformID), nvs.name),
|
||||
nvs.version),
|
||||
string.IsNullOrEmpty(nvs.version) ? "" : " ", nvs.version),
|
||||
Value = nvs.Value
|
||||
@@ -256,7 +261,7 @@ namespace DiscImageChef.Server
|
||||
|
||||
xmlFile = xmlFile.Replace('/', '_').Replace('\\', '_').Replace('?', '_');
|
||||
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports",
|
||||
if(!File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Reports",
|
||||
xmlFile))) url = null;
|
||||
|
||||
devices.Add(new DeviceItem
|
||||
@@ -299,7 +304,7 @@ namespace DiscImageChef.Server
|
||||
catch(IOException)
|
||||
{
|
||||
if(fs != null) fs.Dispose();
|
||||
System.Threading.Thread.Sleep(50);
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
85
DiscImageChef.Server/Statistics.aspx.designer.cs
generated
85
DiscImageChef.Server/Statistics.aspx.designer.cs
generated
@@ -8,91 +8,94 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DiscImageChef.Server {
|
||||
|
||||
|
||||
public partial class Statistics {
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl body;
|
||||
protected HtmlGenericControl body;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblVersion;
|
||||
protected Label lblVersion;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl content;
|
||||
protected HtmlGenericControl content;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divOperatingSystems;
|
||||
protected HtmlGenericControl divOperatingSystems;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repOperatingSystems;
|
||||
protected Repeater repOperatingSystems;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divVersions;
|
||||
protected HtmlGenericControl divVersions;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repVersions;
|
||||
protected Repeater repVersions;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divCommands;
|
||||
protected HtmlGenericControl divCommands;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblAnalyze;
|
||||
protected Label lblAnalyze;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblBenchmark;
|
||||
protected Label lblBenchmark;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblChecksum;
|
||||
protected Label lblChecksum;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblCompare;
|
||||
protected Label lblCompare;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblCreateSidecar;
|
||||
protected Label lblCreateSidecar;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblDecode;
|
||||
protected Label lblDecode;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblDeviceInfo;
|
||||
protected Label lblDeviceInfo;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblDeviceReport;
|
||||
protected Label lblDeviceReport;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblDumpMedia;
|
||||
protected Label lblDumpMedia;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblEntropy;
|
||||
protected Label lblEntropy;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblExtractFiles;
|
||||
protected Label lblExtractFiles;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblFormats;
|
||||
protected Label lblFormats;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblListDevices;
|
||||
protected Label lblListDevices;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblListEncodings;
|
||||
protected Label lblListEncodings;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblLs;
|
||||
protected Label lblLs;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblMediaInfo;
|
||||
protected Label lblMediaInfo;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblMediaScan;
|
||||
protected Label lblMediaScan;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPrintHex;
|
||||
protected Label lblPrintHex;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblVerify;
|
||||
protected Label lblVerify;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divFilters;
|
||||
protected HtmlGenericControl divFilters;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repFilters;
|
||||
protected Repeater repFilters;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divMediaImages;
|
||||
protected HtmlGenericControl divMediaImages;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repMediaImages;
|
||||
protected Repeater repMediaImages;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divPartitions;
|
||||
protected HtmlGenericControl divPartitions;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repPartitions;
|
||||
protected Repeater repPartitions;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divFilesystems;
|
||||
protected HtmlGenericControl divFilesystems;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repFilesystems;
|
||||
protected Repeater repFilesystems;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divVirtualMedia;
|
||||
protected HtmlGenericControl divVirtualMedia;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repVirtualMedia;
|
||||
protected Repeater repVirtualMedia;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divRealMedia;
|
||||
protected HtmlGenericControl divRealMedia;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repRealMedia;
|
||||
protected Repeater repRealMedia;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divDevices;
|
||||
protected HtmlGenericControl divDevices;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repDevices;
|
||||
protected Repeater repDevices;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,14 +35,18 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.UI;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.Decoders.PCMCIA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Metadata;
|
||||
using DiscImageChef.Server.App_Start;
|
||||
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
public partial class ViewReport : System.Web.UI.Page
|
||||
public partial class ViewReport : Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -78,7 +82,7 @@ namespace DiscImageChef.Server
|
||||
else if(!string.IsNullOrWhiteSpace(model)) xmlFile = model + ".xml";
|
||||
|
||||
if(xmlFile == null ||
|
||||
!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
|
||||
!File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
|
||||
{
|
||||
content.InnerHtml = "<b>Could not find the specified report</b>";
|
||||
return;
|
||||
@@ -91,7 +95,7 @@ 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",
|
||||
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~"), "Reports",
|
||||
xmlFile));
|
||||
report = (DeviceReport)xs.Deserialize(sr);
|
||||
sr.Close();
|
||||
@@ -132,23 +136,23 @@ namespace DiscImageChef.Server
|
||||
lblPcmciaManufacturerCode.Text = string.Format("0x{0:x4}", report.PCMCIA.ManufacturerCode);
|
||||
lblPcmciaCardCode.Text = string.Format("0x{0:x4}", report.PCMCIA.CardCode);
|
||||
lblPcmciaCompliance.Text = HttpUtility.HtmlEncode(report.PCMCIA.Compliance);
|
||||
Decoders.PCMCIA.Tuple[] tuples = Decoders.PCMCIA.CIS.GetTuples(report.PCMCIA.CIS);
|
||||
Tuple[] tuples = CIS.GetTuples(report.PCMCIA.CIS);
|
||||
if(tuples != null)
|
||||
{
|
||||
Dictionary<string, string> decodedTuples = new Dictionary<string, string>();
|
||||
foreach(Decoders.PCMCIA.Tuple tuple in tuples)
|
||||
foreach(Tuple tuple in tuples)
|
||||
switch(tuple.Code)
|
||||
{
|
||||
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_DEVICEGEO:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICEGEO_A:
|
||||
Decoders.PCMCIA.DeviceGeometryTuple geom =
|
||||
Decoders.PCMCIA.CIS.DecodeDeviceGeometryTuple(tuple.Data);
|
||||
case TupleCodes.CISTPL_NULL:
|
||||
case TupleCodes.CISTPL_END:
|
||||
case TupleCodes.CISTPL_MANFID:
|
||||
case TupleCodes.CISTPL_VERS_1: break;
|
||||
case TupleCodes.CISTPL_DEVICEGEO:
|
||||
case TupleCodes.CISTPL_DEVICEGEO_A:
|
||||
DeviceGeometryTuple geom =
|
||||
CIS.DecodeDeviceGeometryTuple(tuple.Data);
|
||||
if(geom != null && geom.Geometries != null)
|
||||
foreach(Decoders.PCMCIA.DeviceGeometry geometry in geom.Geometries)
|
||||
foreach(DeviceGeometry geometry in geom.Geometries)
|
||||
{
|
||||
decodedTuples.Add("Device width",
|
||||
string.Format("{0} bits",
|
||||
@@ -173,40 +177,40 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
|
||||
break;
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_ALTSTR:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_BAR:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_BATTERY:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_BYTEORDER:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_CFTABLE_ENTRY:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_CFTABLE_ENTRY_CB:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_CHECKSUM:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_CONFIG:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_CONFIG_CB:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DATE:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICE:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICE_A:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICE_OA:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_DEVICE_OC:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_EXTDEVIC:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_FORMAT:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_FORMAT_A:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_FUNCE:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_FUNCID:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_GEOMETRY:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_INDIRECT:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_JEDEC_A:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_JEDEC_C:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_LINKTARGET:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_LONGLINK_A:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_LONGLINK_C:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_LONGLINK_CB:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_LONGLINK_MFC:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_NO_LINK:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_ORG:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_PWR_MGMNT:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_SPCL:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_SWIL:
|
||||
case Decoders.PCMCIA.TupleCodes.CISTPL_VERS_2:
|
||||
case TupleCodes.CISTPL_ALTSTR:
|
||||
case TupleCodes.CISTPL_BAR:
|
||||
case TupleCodes.CISTPL_BATTERY:
|
||||
case TupleCodes.CISTPL_BYTEORDER:
|
||||
case TupleCodes.CISTPL_CFTABLE_ENTRY:
|
||||
case TupleCodes.CISTPL_CFTABLE_ENTRY_CB:
|
||||
case TupleCodes.CISTPL_CHECKSUM:
|
||||
case TupleCodes.CISTPL_CONFIG:
|
||||
case TupleCodes.CISTPL_CONFIG_CB:
|
||||
case TupleCodes.CISTPL_DATE:
|
||||
case TupleCodes.CISTPL_DEVICE:
|
||||
case TupleCodes.CISTPL_DEVICE_A:
|
||||
case TupleCodes.CISTPL_DEVICE_OA:
|
||||
case TupleCodes.CISTPL_DEVICE_OC:
|
||||
case TupleCodes.CISTPL_EXTDEVIC:
|
||||
case TupleCodes.CISTPL_FORMAT:
|
||||
case TupleCodes.CISTPL_FORMAT_A:
|
||||
case TupleCodes.CISTPL_FUNCE:
|
||||
case TupleCodes.CISTPL_FUNCID:
|
||||
case TupleCodes.CISTPL_GEOMETRY:
|
||||
case TupleCodes.CISTPL_INDIRECT:
|
||||
case TupleCodes.CISTPL_JEDEC_A:
|
||||
case TupleCodes.CISTPL_JEDEC_C:
|
||||
case TupleCodes.CISTPL_LINKTARGET:
|
||||
case TupleCodes.CISTPL_LONGLINK_A:
|
||||
case TupleCodes.CISTPL_LONGLINK_C:
|
||||
case TupleCodes.CISTPL_LONGLINK_CB:
|
||||
case TupleCodes.CISTPL_LONGLINK_MFC:
|
||||
case TupleCodes.CISTPL_NO_LINK:
|
||||
case TupleCodes.CISTPL_ORG:
|
||||
case TupleCodes.CISTPL_PWR_MGMNT:
|
||||
case TupleCodes.CISTPL_SPCL:
|
||||
case TupleCodes.CISTPL_SWIL:
|
||||
case TupleCodes.CISTPL_VERS_2:
|
||||
decodedTuples.Add("Undecoded tuple ID", tuple.Code.ToString());
|
||||
break;
|
||||
default:
|
||||
@@ -563,10 +567,10 @@ namespace DiscImageChef.Server
|
||||
vendorDescription = null;
|
||||
productDescription = null;
|
||||
|
||||
if(!File.Exists(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids"))) return;
|
||||
if(!File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "usb.ids"))) return;
|
||||
|
||||
StreamReader tocStream =
|
||||
new StreamReader(Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "usb.ids"));
|
||||
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~"), "usb.ids"));
|
||||
string _line;
|
||||
bool inManufacturer = false;
|
||||
ushort number;
|
||||
@@ -589,19 +593,16 @@ namespace DiscImageChef.Server
|
||||
productDescription = _line.Substring(7);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Skip products
|
||||
if(_line[0] == '\t') continue;
|
||||
// Skip products
|
||||
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) continue;
|
||||
if(number != vendor) continue;
|
||||
|
||||
vendorDescription = _line.Substring(6);
|
||||
inManufacturer = true;
|
||||
}
|
||||
vendorDescription = _line.Substring(6);
|
||||
inManufacturer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
109
DiscImageChef.Server/ViewReport.aspx.designer.cs
generated
109
DiscImageChef.Server/ViewReport.aspx.designer.cs
generated
@@ -8,115 +8,118 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace DiscImageChef.Server {
|
||||
|
||||
|
||||
public partial class ViewReport {
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl content;
|
||||
protected HtmlGenericControl content;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblManufacturer;
|
||||
protected Label lblManufacturer;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblModel;
|
||||
protected Label lblModel;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblRevision;
|
||||
protected Label lblRevision;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divUsb;
|
||||
protected HtmlGenericControl divUsb;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbManufacturer;
|
||||
protected Label lblUsbManufacturer;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbProduct;
|
||||
protected Label lblUsbProduct;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbVendor;
|
||||
protected Label lblUsbVendor;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbVendorDescription;
|
||||
protected Label lblUsbVendorDescription;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbProductId;
|
||||
protected Label lblUsbProductId;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblUsbProductDescription;
|
||||
protected Label lblUsbProductDescription;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divFirewire;
|
||||
protected HtmlGenericControl divFirewire;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblFirewireManufacturer;
|
||||
protected Label lblFirewireManufacturer;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblFirewireProduct;
|
||||
protected Label lblFirewireProduct;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblFirewireVendor;
|
||||
protected Label lblFirewireVendor;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblFirewireProductId;
|
||||
protected Label lblFirewireProductId;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divPcmcia;
|
||||
protected HtmlGenericControl divPcmcia;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPcmciaManufacturer;
|
||||
protected Label lblPcmciaManufacturer;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPcmciaProduct;
|
||||
protected Label lblPcmciaProduct;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPcmciaManufacturerCode;
|
||||
protected Label lblPcmciaManufacturerCode;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPcmciaCardCode;
|
||||
protected Label lblPcmciaCardCode;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblPcmciaCompliance;
|
||||
protected Label lblPcmciaCompliance;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repPcmciaTuples;
|
||||
protected Repeater repPcmciaTuples;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divAta;
|
||||
protected HtmlGenericControl divAta;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblAtapi;
|
||||
protected Label lblAtapi;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblAtaDeviceType;
|
||||
protected Label lblAtaDeviceType;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repAtaTwo;
|
||||
protected Repeater repAtaTwo;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repAtaOne;
|
||||
protected Repeater repAtaOne;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsi;
|
||||
protected HtmlGenericControl divScsi;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiVendor;
|
||||
protected Label lblScsiVendor;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiProduct;
|
||||
protected Label lblScsiProduct;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiRevision;
|
||||
protected Label lblScsiRevision;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repScsi;
|
||||
protected Repeater repScsi;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsiModeSense;
|
||||
protected HtmlGenericControl divScsiModeSense;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repModeSense;
|
||||
protected Repeater repModeSense;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsiEvpd;
|
||||
protected HtmlGenericControl divScsiEvpd;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repEvpd;
|
||||
protected Repeater repEvpd;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsiMmcMode;
|
||||
protected HtmlGenericControl divScsiMmcMode;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repScsiMmcMode;
|
||||
protected Repeater repScsiMmcMode;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsiMmcFeatures;
|
||||
protected HtmlGenericControl divScsiMmcFeatures;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repScsiMmcFeatures;
|
||||
protected Repeater repScsiMmcFeatures;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divScsiSsc;
|
||||
protected HtmlGenericControl divScsiSsc;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiSscGranularity;
|
||||
protected Label lblScsiSscGranularity;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiSscMaxBlock;
|
||||
protected Label lblScsiSscMaxBlock;
|
||||
|
||||
protected System.Web.UI.WebControls.Label lblScsiSscMinBlock;
|
||||
protected Label lblScsiSscMinBlock;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repScsiSscDensities;
|
||||
protected Repeater repScsiSscDensities;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repScsiSscMedias;
|
||||
protected Repeater repScsiSscMedias;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divTestedMedia;
|
||||
protected HtmlGenericControl divTestedMedia;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repTestedMedia;
|
||||
protected Repeater repTestedMedia;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divMMC;
|
||||
protected HtmlGenericControl divMMC;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repMMC;
|
||||
protected Repeater repMMC;
|
||||
|
||||
protected System.Web.UI.HtmlControls.HtmlGenericControl divSD;
|
||||
protected HtmlGenericControl divSD;
|
||||
|
||||
protected System.Web.UI.WebControls.Repeater repSD;
|
||||
protected Repeater repSD;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user