mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
View reports from server database.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ using System.Collections.Generic;
|
|||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
public static class ScsiEvpd
|
public static class ScsiEvpd
|
||||||
{
|
{
|
||||||
@@ -45,9 +45,9 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// <param name="pages">EVPD pages</param>
|
/// <param name="pages">EVPD pages</param>
|
||||||
/// <param name="vendor">SCSI vendor string</param>
|
/// <param name="vendor">SCSI vendor string</param>
|
||||||
/// <param name="evpdPages">List to put the key=value pairs on</param>
|
/// <param name="evpdPages">List to put the key=value pairs on</param>
|
||||||
public static void Report(pageType[] pages, string vendor, ref Dictionary<string, string> evpdPages)
|
public static void Report(IEnumerable<ScsiPage> pages, string vendor, ref Dictionary<string, string> evpdPages)
|
||||||
{
|
{
|
||||||
foreach(pageType evpd in pages)
|
foreach(ScsiPage evpd in pages)
|
||||||
{
|
{
|
||||||
string decoded;
|
string decoded;
|
||||||
if(evpd.page >= 0x01 && evpd.page <= 0x7F) decoded = EVPD.DecodeASCIIPage(evpd.value);
|
if(evpd.page >= 0x01 && evpd.page <= 0x7F) decoded = EVPD.DecodeASCIIPage(evpd.value);
|
||||||
|
|||||||
@@ -31,10 +31,9 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
static class ScsiInquiry
|
static class ScsiInquiry
|
||||||
{
|
{
|
||||||
@@ -42,13 +41,17 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// Takes the SCSI INQUIRY part of a device report and prints it as a list of values to be sequenced by ASP.NET in the
|
/// Takes the SCSI INQUIRY part of a device report and prints it as a list of values to be sequenced by ASP.NET in the
|
||||||
/// rendering
|
/// rendering
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inquiry">INQUIRY part of the report</param>
|
/// <param name="inquiryNullable">INQUIRY part of the report</param>
|
||||||
/// <returns>List of values</returns>
|
/// <returns>List of values</returns>
|
||||||
internal static List<string> Report(scsiInquiryType inquiry)
|
internal static IEnumerable<string> Report(Inquiry.SCSIInquiry? inquiryNullable)
|
||||||
{
|
{
|
||||||
List<string> scsiOneValue = new List<string>();
|
List<string> scsiOneValue = new List<string>();
|
||||||
|
|
||||||
switch(inquiry.PeripheralQualifier)
|
if(!inquiryNullable.HasValue) return scsiOneValue;
|
||||||
|
|
||||||
|
Inquiry.SCSIInquiry inquiry = inquiryNullable.Value;
|
||||||
|
|
||||||
|
switch((PeripheralQualifiers)inquiry.PeripheralQualifier)
|
||||||
{
|
{
|
||||||
case PeripheralQualifiers.Supported:
|
case PeripheralQualifiers.Supported:
|
||||||
scsiOneValue.Add("Device is connected and supported.");
|
scsiOneValue.Add("Device is connected and supported.");
|
||||||
@@ -67,7 +70,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(inquiry.PeripheralDeviceType)
|
switch((PeripheralDeviceTypes)inquiry.PeripheralDeviceType)
|
||||||
{
|
{
|
||||||
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
||||||
scsiOneValue.Add("Direct-access device");
|
scsiOneValue.Add("Direct-access device");
|
||||||
@@ -200,35 +203,34 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inquiry.Removable) scsiOneValue.Add("Device is removable");
|
if(inquiry.RMB) scsiOneValue.Add("Device is removable");
|
||||||
if(inquiry.AERCSupported) scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
if(inquiry.AERC) scsiOneValue.Add("Device supports Asynchronous Event Reporting Capability");
|
||||||
if(inquiry.TerminateTaskSupported) scsiOneValue.Add("Device supports TERMINATE TASK command");
|
if(inquiry.TrmTsk) scsiOneValue.Add("Device supports TERMINATE TASK command");
|
||||||
if(inquiry.NormalACA) scsiOneValue.Add("Device supports setting Normal ACA");
|
if(inquiry.NormACA) scsiOneValue.Add("Device supports setting Normal ACA");
|
||||||
if(inquiry.HierarchicalLUN) scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
if(inquiry.HiSup) scsiOneValue.Add("Device supports LUN hierarchical addressing");
|
||||||
if(inquiry.StorageArrayController) scsiOneValue.Add("Device contains an embedded storage array controller");
|
if(inquiry.SCCS) scsiOneValue.Add("Device contains an embedded storage array controller");
|
||||||
if(inquiry.AccessControlCoordinator) scsiOneValue.Add("Device contains an Access Control Coordinator");
|
if(inquiry.ACC) scsiOneValue.Add("Device contains an Access Control Coordinator");
|
||||||
if(inquiry.ThirdPartyCopy) scsiOneValue.Add("Device supports third-party copy commands");
|
if(inquiry.ThreePC) scsiOneValue.Add("Device supports third-party copy commands");
|
||||||
if(inquiry.Protection) scsiOneValue.Add("Device supports protection information");
|
if(inquiry.Protect) scsiOneValue.Add("Device supports protection information");
|
||||||
if(inquiry.BasicQueueing) scsiOneValue.Add("Device supports basic queueing");
|
if(inquiry.BQue) scsiOneValue.Add("Device supports basic queueing");
|
||||||
if(inquiry.EnclosureServices) scsiOneValue.Add("Device contains an embedded enclosure services component");
|
if(inquiry.EncServ) scsiOneValue.Add("Device contains an embedded enclosure services component");
|
||||||
if(inquiry.MultiPortDevice) scsiOneValue.Add("Multi-port device");
|
if(inquiry.MultiP) scsiOneValue.Add("Multi-port device");
|
||||||
if(inquiry.MediumChanger) scsiOneValue.Add("Device contains or is attached to a medium changer");
|
if(inquiry.MChngr) scsiOneValue.Add("Device contains or is attached to a medium changer");
|
||||||
if(inquiry.ACKRequests) scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
if(inquiry.ACKREQQ) scsiOneValue.Add("Device supports request and acknowledge handshakes");
|
||||||
if(inquiry.Address32) scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
if(inquiry.Addr32) scsiOneValue.Add("Device supports 32-bit wide SCSI addresses");
|
||||||
if(inquiry.Address16) scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
if(inquiry.Addr16) scsiOneValue.Add("Device supports 16-bit wide SCSI addresses");
|
||||||
if(inquiry.RelativeAddressing) scsiOneValue.Add("Device supports relative addressing");
|
if(inquiry.RelAddr) scsiOneValue.Add("Device supports relative addressing");
|
||||||
if(inquiry.WideBus32) scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
if(inquiry.WBus32) scsiOneValue.Add("Device supports 32-bit wide data transfers");
|
||||||
if(inquiry.WideBus16) scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
if(inquiry.WBus16) scsiOneValue.Add("Device supports 16-bit wide data transfers");
|
||||||
if(inquiry.SyncTransfer) scsiOneValue.Add("Device supports synchronous data transfer");
|
if(inquiry.Sync) scsiOneValue.Add("Device supports synchronous data transfer");
|
||||||
if(inquiry.LinkedCommands) scsiOneValue.Add("Device supports linked commands");
|
if(inquiry.Linked) scsiOneValue.Add("Device supports linked commands");
|
||||||
if(inquiry.TranferDisable)
|
if(inquiry.TranDis) scsiOneValue.Add("Device supports CONTINUE TASK and TARGET TRANSFER DISABLE commands");
|
||||||
scsiOneValue.Add("Device supports CONTINUE TASK and TARGET TRANSFER DISABLE commands");
|
|
||||||
if(inquiry.QAS) scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
if(inquiry.QAS) scsiOneValue.Add("Device supports Quick Arbitration and Selection");
|
||||||
if(inquiry.TaggedCommandQueue) scsiOneValue.Add("Device supports TCQ queue");
|
if(inquiry.CmdQue) scsiOneValue.Add("Device supports TCQ queue");
|
||||||
if(inquiry.IUS) scsiOneValue.Add("Device supports information unit transfers");
|
if(inquiry.IUS) scsiOneValue.Add("Device supports information unit transfers");
|
||||||
if(inquiry.SoftReset) scsiOneValue.Add("Device implements RESET as a soft reset");
|
if(inquiry.SftRe) scsiOneValue.Add("Device implements RESET as a soft reset");
|
||||||
|
|
||||||
switch(inquiry.AsymmetricalLUNAccess)
|
switch((TGPSValues)inquiry.TPGS)
|
||||||
{
|
{
|
||||||
case TGPSValues.NotSupported:
|
case TGPSValues.NotSupported:
|
||||||
scsiOneValue.Add("Device does not support assymetrical access");
|
scsiOneValue.Add("Device does not support assymetrical access");
|
||||||
@@ -243,11 +245,11 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
scsiOneValue.Add("Device supports implicit and explicit assymetrical access");
|
scsiOneValue.Add("Device supports implicit and explicit assymetrical access");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
scsiOneValue.Add($"Unknown value in TPGS field 0x{inquiry.AsymmetricalLUNAccess:X2}");
|
scsiOneValue.Add($"Unknown value in TPGS field 0x{inquiry.TPGS:X2}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(inquiry.SPIClocking)
|
switch((SPIClocking)inquiry.Clocking)
|
||||||
{
|
{
|
||||||
case SPIClocking.ST:
|
case SPIClocking.ST:
|
||||||
scsiOneValue.Add("Device supports only ST clocking");
|
scsiOneValue.Add("Device supports only ST clocking");
|
||||||
@@ -262,7 +264,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
scsiOneValue.Add("Device supports ST and DT clocking");
|
scsiOneValue.Add("Device supports ST and DT clocking");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
scsiOneValue.Add($"Unknown value in SPI clocking field 0x{inquiry.SPIClocking:X2}");
|
scsiOneValue.Add($"Unknown value in SPI clocking field 0x{inquiry.Clocking:X2}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ using System.Collections.Generic;
|
|||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Decoders.SCSI.MMC;
|
using DiscImageChef.Decoders.SCSI.MMC;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
public static class ScsiMmcFeatures
|
public static class ScsiMmcFeatures
|
||||||
{
|
{
|
||||||
@@ -44,16 +44,16 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ftr">FEATURES part of the report</param>
|
/// <param name="ftr">FEATURES part of the report</param>
|
||||||
/// <param name="mmcOneValue">List to put the values on</param>
|
/// <param name="mmcOneValue">List to put the values on</param>
|
||||||
public static void Report(mmcFeaturesType ftr, ref List<string> mmcOneValue)
|
public static void Report(MmcFeatures ftr, ref List<string> mmcOneValue)
|
||||||
{
|
{
|
||||||
if(ftr.SupportsAACS && ftr.AACSVersionSpecified)
|
if(ftr.SupportsAACS && ftr.AACSVersion.HasValue)
|
||||||
mmcOneValue.Add($"Drive supports AACS version {ftr.AACSVersion}");
|
mmcOneValue.Add($"Drive supports AACS version {ftr.AACSVersion}");
|
||||||
else if(ftr.SupportsAACS) mmcOneValue.Add("Drive supports AACS");
|
else if(ftr.SupportsAACS) mmcOneValue.Add("Drive supports AACS");
|
||||||
if(ftr.AGIDsSpecified) mmcOneValue.Add($"Drive supports {ftr.AGIDs} AGIDs concurrently");
|
if(ftr.AGIDs.HasValue) mmcOneValue.Add($"Drive supports {ftr.AGIDs} AGIDs concurrently");
|
||||||
if(ftr.CanGenerateBindingNonce)
|
if(ftr.CanGenerateBindingNonce)
|
||||||
{
|
{
|
||||||
mmcOneValue.Add("Drive supports generating the binding nonce");
|
mmcOneValue.Add("Drive supports generating the binding nonce");
|
||||||
if(ftr.BindingNonceBlocksSpecified)
|
if(ftr.BindingNonceBlocks.HasValue)
|
||||||
mmcOneValue.Add($"{ftr.BindingNonceBlocks} media blocks are required for the binding nonce");
|
mmcOneValue.Add($"{ftr.BindingNonceBlocks} media blocks are required for the binding nonce");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,42 +131,44 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
if(ftr.MultiRead)
|
if(ftr.MultiRead)
|
||||||
mmcOneValue.Add("Drive claims capability to read all CD formats according to OSTA Multi-Read Specification");
|
mmcOneValue.Add("Drive claims capability to read all CD formats according to OSTA Multi-Read Specification");
|
||||||
|
|
||||||
switch(ftr.PhysicalInterfaceStandard)
|
if(ftr.PhysicalInterfaceStandard.HasValue)
|
||||||
{
|
switch(ftr.PhysicalInterfaceStandard)
|
||||||
case PhysicalInterfaces.Unspecified:
|
{
|
||||||
mmcOneValue.Add("Drive uses an unspecified physical interface");
|
case PhysicalInterfaces.Unspecified:
|
||||||
break;
|
mmcOneValue.Add("Drive uses an unspecified physical interface");
|
||||||
case PhysicalInterfaces.SCSI:
|
break;
|
||||||
mmcOneValue.Add("Drive uses SCSI interface");
|
case PhysicalInterfaces.SCSI:
|
||||||
break;
|
mmcOneValue.Add("Drive uses SCSI interface");
|
||||||
case PhysicalInterfaces.ATAPI:
|
break;
|
||||||
mmcOneValue.Add("Drive uses ATAPI interface");
|
case PhysicalInterfaces.ATAPI:
|
||||||
break;
|
mmcOneValue.Add("Drive uses ATAPI interface");
|
||||||
case PhysicalInterfaces.IEEE1394:
|
break;
|
||||||
mmcOneValue.Add("Drive uses IEEE-1394 interface");
|
case PhysicalInterfaces.IEEE1394:
|
||||||
break;
|
mmcOneValue.Add("Drive uses IEEE-1394 interface");
|
||||||
case PhysicalInterfaces.IEEE1394A:
|
break;
|
||||||
mmcOneValue.Add("Drive uses IEEE-1394A interface");
|
case PhysicalInterfaces.IEEE1394A:
|
||||||
break;
|
mmcOneValue.Add("Drive uses IEEE-1394A interface");
|
||||||
case PhysicalInterfaces.FC:
|
break;
|
||||||
mmcOneValue.Add("Drive uses Fibre Channel interface");
|
case PhysicalInterfaces.FC:
|
||||||
break;
|
mmcOneValue.Add("Drive uses Fibre Channel interface");
|
||||||
case PhysicalInterfaces.IEEE1394B:
|
break;
|
||||||
mmcOneValue.Add("Drive uses IEEE-1394B interface");
|
case PhysicalInterfaces.IEEE1394B:
|
||||||
break;
|
mmcOneValue.Add("Drive uses IEEE-1394B interface");
|
||||||
case PhysicalInterfaces.SerialATAPI:
|
break;
|
||||||
mmcOneValue.Add("Drive uses Serial ATAPI interface");
|
case PhysicalInterfaces.SerialATAPI:
|
||||||
break;
|
mmcOneValue.Add("Drive uses Serial ATAPI interface");
|
||||||
case PhysicalInterfaces.USB:
|
break;
|
||||||
mmcOneValue.Add("Drive uses USB interface");
|
case PhysicalInterfaces.USB:
|
||||||
break;
|
mmcOneValue.Add("Drive uses USB interface");
|
||||||
case PhysicalInterfaces.Vendor:
|
break;
|
||||||
mmcOneValue.Add("Drive uses a vendor unique interface");
|
case PhysicalInterfaces.Vendor:
|
||||||
break;
|
mmcOneValue.Add("Drive uses a vendor unique interface");
|
||||||
default:
|
break;
|
||||||
mmcOneValue.Add($"Drive uses an unknown interface with code {(uint)ftr.PhysicalInterfaceStandard}");
|
default:
|
||||||
break;
|
mmcOneValue
|
||||||
}
|
.Add($"Drive uses an unknown interface with code {(uint)ftr.PhysicalInterfaceStandard}");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(ftr.PreventJumper) mmcOneValue.Add("Drive power ups locked");
|
if(ftr.PreventJumper) mmcOneValue.Add("Drive power ups locked");
|
||||||
if(ftr.SupportsBusEncryption) mmcOneValue.Add("Drive supports bus encryption");
|
if(ftr.SupportsBusEncryption) mmcOneValue.Add("Drive supports bus encryption");
|
||||||
@@ -229,40 +231,41 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
mmcOneValue.Add($"Drive has {ftr.ChangerSlots + 1} slots");
|
mmcOneValue.Add($"Drive has {ftr.ChangerSlots + 1} slots");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ftr.SupportsCSS && ftr.CSSVersionSpecified)
|
if(ftr.SupportsCSS && ftr.CSSVersion.HasValue)
|
||||||
mmcOneValue.Add($"Drive supports DVD CSS/CPPM version {ftr.CSSVersion}");
|
mmcOneValue.Add($"Drive supports DVD CSS/CPPM version {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)
|
if(ftr.SupportsCPRM && ftr.CPRMVersion.HasValue)
|
||||||
mmcOneValue.Add($"Drive supports DVD CPPM version {ftr.CPRMVersion}");
|
mmcOneValue.Add($"Drive supports DVD CPPM version {ftr.CPRMVersion}");
|
||||||
else if(ftr.SupportsCPRM) mmcOneValue.Add("Drive supports DVD CPRM");
|
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.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.DVDMultiRead) mmcOneValue.Add("Drive conforms to DVD Multi Drive Read-only Specifications");
|
||||||
if(ftr.FirmwareDateSpecified) mmcOneValue.Add($"Drive firmware is dated {ftr.FirmwareDate}");
|
if(ftr.FirmwareDate.HasValue) mmcOneValue.Add($"Drive firmware is dated {ftr.FirmwareDate}");
|
||||||
if(ftr.SupportsC2) mmcOneValue.Add("Drive supports C2 Error Pointers");
|
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.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.SupportsDeviceBusyEvent) mmcOneValue.Add("Drive supports Device Busy events");
|
||||||
|
|
||||||
switch(ftr.LoadingMechanismType)
|
if(ftr.LoadingMechanismType.HasValue)
|
||||||
{
|
switch(ftr.LoadingMechanismType)
|
||||||
case 0:
|
{
|
||||||
mmcOneValue.Add("Drive uses media caddy");
|
case 0:
|
||||||
break;
|
mmcOneValue.Add("Drive uses media caddy");
|
||||||
case 1:
|
break;
|
||||||
mmcOneValue.Add("Drive uses a tray");
|
case 1:
|
||||||
break;
|
mmcOneValue.Add("Drive uses a tray");
|
||||||
case 2:
|
break;
|
||||||
mmcOneValue.Add("Drive is pop-up");
|
case 2:
|
||||||
break;
|
mmcOneValue.Add("Drive is pop-up");
|
||||||
case 4:
|
break;
|
||||||
mmcOneValue.Add("Drive is a changer with individually changeable discs");
|
case 4:
|
||||||
break;
|
mmcOneValue.Add("Drive is a changer with individually changeable discs");
|
||||||
case 5:
|
break;
|
||||||
mmcOneValue.Add("Drive is a changer using cartridges");
|
case 5:
|
||||||
break;
|
mmcOneValue.Add("Drive is a changer using cartridges");
|
||||||
default:
|
break;
|
||||||
mmcOneValue.Add($"Drive uses unknown loading mechanism type {ftr.LoadingMechanismType}");
|
default:
|
||||||
break;
|
mmcOneValue.Add($"Drive uses unknown loading mechanism type {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)
|
if(ftr.SupportsModePage1Ch)
|
||||||
@@ -274,7 +277,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
if(ftr.SupportsSecurDisc) mmcOneValue.Add("Drive supports SecurDisc");
|
if(ftr.SupportsSecurDisc) mmcOneValue.Add("Drive supports SecurDisc");
|
||||||
if(ftr.SupportsSeparateVolume) mmcOneValue.Add("Drive supports separate volume per channel");
|
if(ftr.SupportsSeparateVolume) mmcOneValue.Add("Drive supports separate volume per channel");
|
||||||
if(ftr.SupportsVCPS) mmcOneValue.Add("Drive supports VCPS");
|
if(ftr.SupportsVCPS) mmcOneValue.Add("Drive supports VCPS");
|
||||||
if(ftr.VolumeLevelsSpecified) mmcOneValue.Add($"Drive has {ftr.VolumeLevels + 1} volume levels");
|
if(ftr.VolumeLevels.HasValue) mmcOneValue.Add($"Drive has {ftr.VolumeLevels + 1} volume levels");
|
||||||
if(ftr.SupportsWriteProtectPAC)
|
if(ftr.SupportsWriteProtectPAC)
|
||||||
mmcOneValue.Add("Drive supports reading/writing the Disc Write Protect PAC on BD-R/-RE media");
|
mmcOneValue.Add("Drive supports reading/writing the Disc Write Protect PAC on BD-R/-RE media");
|
||||||
if(ftr.SupportsWriteInhibitDCB)
|
if(ftr.SupportsWriteInhibitDCB)
|
||||||
|
|||||||
@@ -32,10 +32,9 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
public static class ScsiMmcMode
|
public static class ScsiMmcMode
|
||||||
{
|
{
|
||||||
@@ -45,23 +44,22 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mode">MODE PAGE 2Ah part of the report</param>
|
/// <param name="mode">MODE PAGE 2Ah part of the report</param>
|
||||||
/// <param name="mmcOneValue">List to put the values on</param>
|
/// <param name="mmcOneValue">List to put the values on</param>
|
||||||
public static void Report(mmcModeType mode, ref List<string> mmcOneValue)
|
public static void Report(Modes.ModePage_2A mode, ref List<string> mmcOneValue)
|
||||||
{
|
{
|
||||||
if(mode.PlaysAudio) mmcOneValue.Add("Drive can play audio");
|
if(mode.AudioPlay) mmcOneValue.Add("Drive can play audio");
|
||||||
if(mode.ReadsMode2Form1) mmcOneValue.Add("Drive can read sectors in Mode 2 Form 1 format");
|
if(mode.Mode2Form1) 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.Mode2Form2) 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.MultiSession) mmcOneValue.Add("Drive supports multi-session discs and/or Photo-CD");
|
||||||
|
|
||||||
if(mode.CDDACommand) mmcOneValue.Add("Drive can read digital audio");
|
if(mode.CDDACommand) mmcOneValue.Add("Drive can read digital audio");
|
||||||
if(mode.AccurateCDDA) mmcOneValue.Add("Drive can continue from streaming loss");
|
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.Subchannel) mmcOneValue.Add("Drive can read uncorrected and interleaved R-W subchannels");
|
||||||
if(mode.ReadsDeinterlavedSubchannel)
|
if(mode.DeinterlaveSubchannel) mmcOneValue.Add("Drive can read, deinterleave and correct R-W subchannels");
|
||||||
mmcOneValue.Add("Drive can read, deinterleave and correct R-W subchannels");
|
if(mode.C2Pointer) mmcOneValue.Add("Drive supports C2 pointers");
|
||||||
if(mode.ReturnsC2Pointers) mmcOneValue.Add("Drive supports C2 pointers");
|
if(mode.UPC) mmcOneValue.Add("Drive can read Media Catalogue Number");
|
||||||
if(mode.ReadsUPC) mmcOneValue.Add("Drive can read Media Catalogue Number");
|
if(mode.ISRC) mmcOneValue.Add("Drive can read ISRC");
|
||||||
if(mode.ReadsISRC) mmcOneValue.Add("Drive can read ISRC");
|
|
||||||
|
|
||||||
switch(mode.LoadingMechanismType)
|
switch(mode.LoadingMechanism)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
mmcOneValue.Add("Drive uses media caddy");
|
mmcOneValue.Add("Drive uses media caddy");
|
||||||
@@ -79,24 +77,24 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
mmcOneValue.Add("Drive is a changer using cartridges");
|
mmcOneValue.Add("Drive is a changer using cartridges");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
mmcOneValue.Add($"Drive uses unknown loading mechanism type {mode.LoadingMechanismType}");
|
mmcOneValue.Add($"Drive uses unknown loading mechanism type {mode.LoadingMechanism}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mode.CanLockMedia) mmcOneValue.Add("Drive can lock media");
|
if(mode.Lock) mmcOneValue.Add("Drive can lock media");
|
||||||
if(mode.PreventJumperStatus)
|
if(mode.PreventJumper)
|
||||||
{
|
{
|
||||||
mmcOneValue.Add("Drive power ups locked");
|
mmcOneValue.Add("Drive power ups locked");
|
||||||
mmcOneValue.Add(mode.LockStatus
|
mmcOneValue.Add(mode.LockState
|
||||||
? "Drive is locked, media cannot be ejected or inserted"
|
? "Drive is locked, media cannot be ejected or inserted"
|
||||||
: "Drive is not locked, media can be ejected and inserted");
|
: "Drive is not locked, media can be ejected and inserted");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mmcOneValue.Add(mode.LockStatus
|
mmcOneValue.Add(mode.LockState
|
||||||
? "Drive is locked, media cannot be ejected, but if empty, can be inserted"
|
? "Drive is locked, media cannot be ejected, but if empty, can be inserted"
|
||||||
: "Drive is not locked, media can be ejected and inserted");
|
: "Drive is not locked, media can be ejected and inserted");
|
||||||
|
|
||||||
if(mode.CanEject) mmcOneValue.Add("Drive can eject media");
|
if(mode.Eject) mmcOneValue.Add("Drive can eject media");
|
||||||
|
|
||||||
if(mode.SeparateChannelMute) mmcOneValue.Add("Each channel can be muted independently");
|
if(mode.SeparateChannelMute) mmcOneValue.Add("Each channel can be muted independently");
|
||||||
if(mode.SeparateChannelVolume) mmcOneValue.Add("Each channel's volume can be controlled independently");
|
if(mode.SeparateChannelVolume) mmcOneValue.Add("Each channel's volume can be controlled independently");
|
||||||
@@ -109,28 +107,27 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
if(mode.CurrentSpeed > 0)
|
if(mode.CurrentSpeed > 0)
|
||||||
mmcOneValue.Add($"Drive's current reading speed is {mode.CurrentSpeed} Kbyte/sec.");
|
mmcOneValue.Add($"Drive's current reading speed is {mode.CurrentSpeed} Kbyte/sec.");
|
||||||
|
|
||||||
if(mode.ReadsCDR)
|
if(mode.ReadCDR)
|
||||||
{
|
{
|
||||||
mmcOneValue.Add(mode.WritesCDR ? "Drive can read and write CD-R" : "Drive can read CD-R");
|
mmcOneValue.Add(mode.WriteCDR ? "Drive can read and write CD-R" : "Drive can read CD-R");
|
||||||
|
|
||||||
if(mode.ReadsPacketCDR) mmcOneValue.Add("Drive supports reading CD-R packet media");
|
if(mode.Method2) mmcOneValue.Add("Drive supports reading CD-R packet media");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mode.ReadsCDRW)
|
if(mode.ReadCDRW)
|
||||||
mmcOneValue.Add(mode.WritesCDRW ? "Drive can read and write CD-RW" : "Drive can read CD-RW");
|
mmcOneValue.Add(mode.WriteCDRW ? "Drive can read and write CD-RW" : "Drive can read CD-RW");
|
||||||
|
|
||||||
if(mode.ReadsDVDROM) mmcOneValue.Add("Drive can read DVD-ROM");
|
if(mode.ReadDVDROM) mmcOneValue.Add("Drive can read DVD-ROM");
|
||||||
if(mode.ReadsDVDR)
|
if(mode.ReadDVDR)
|
||||||
mmcOneValue.Add(mode.WritesDVDR ? "Drive can read and write DVD-R" : "Drive can read DVD-R");
|
mmcOneValue.Add(mode.WriteDVDR ? "Drive can read and write DVD-R" : "Drive can read DVD-R");
|
||||||
if(mode.ReadsDVDRAM)
|
if(mode.ReadDVDRAM)
|
||||||
mmcOneValue.Add(mode.WritesDVDRAM ? "Drive can read and write DVD-RAM" : "Drive can read DVD-RAM");
|
mmcOneValue.Add(mode.WriteDVDRAM ? "Drive can read and write DVD-RAM" : "Drive can read DVD-RAM");
|
||||||
|
|
||||||
if(mode.CompositeAudioVideo) mmcOneValue.Add("Drive can deliver a composite audio and video data stream");
|
if(mode.Composite) mmcOneValue.Add("Drive can deliver a composite audio and video data stream");
|
||||||
if(mode.DigitalPort1) mmcOneValue.Add("Drive supports IEC-958 digital output on port 1");
|
if(mode.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.DigitalPort2) mmcOneValue.Add("Drive supports IEC-958 digital output on port 2");
|
||||||
|
|
||||||
if(mode.DeterministicSlotChanger)
|
if(mode.SDP) mmcOneValue.Add("Drive contains a changer that can report the exact contents of the slots");
|
||||||
mmcOneValue.Add("Drive contains a changer that can report the exact contents of the slots");
|
|
||||||
if(mode.CurrentWriteSpeedSelected > 0)
|
if(mode.CurrentWriteSpeedSelected > 0)
|
||||||
{
|
{
|
||||||
if(mode.RotationControlSelected == 0)
|
if(mode.RotationControlSelected == 0)
|
||||||
@@ -142,8 +139,8 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(mode.MaximumWriteSpeed > 0)
|
if(mode.MaxWriteSpeed > 0)
|
||||||
mmcOneValue.Add($"Drive's maximum writing speed is {mode.MaximumWriteSpeed} Kbyte/sec.");
|
mmcOneValue.Add($"Drive's maximum writing speed is {mode.MaxWriteSpeed} Kbyte/sec.");
|
||||||
if(mode.CurrentWriteSpeed > 0)
|
if(mode.CurrentWriteSpeed > 0)
|
||||||
mmcOneValue.Add($"Drive's current writing speed is {mode.CurrentWriteSpeed} Kbyte/sec.");
|
mmcOneValue.Add($"Drive's current writing speed is {mode.CurrentWriteSpeed} Kbyte/sec.");
|
||||||
}
|
}
|
||||||
@@ -159,14 +156,14 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
|
|
||||||
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.ReadBarcode) mmcOneValue.Add("Drive can read barcode");
|
||||||
|
|
||||||
if(mode.ReadsBothSides) mmcOneValue.Add("Drive can read both sides of a disc");
|
if(mode.SCC) mmcOneValue.Add("Drive can read both sides of a disc");
|
||||||
if(mode.LeadInPW) mmcOneValue.Add("Drive an read raw R-W subchannel from the Lead-In");
|
if(mode.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.CMRSupported == 1) mmcOneValue.Add("Drive supports DVD CSS and/or DVD CPPM");
|
||||||
|
|
||||||
if(mode.BufferUnderRunProtection) mmcOneValue.Add("Drive supports buffer under-run free recording");
|
if(mode.BUF) mmcOneValue.Add("Drive supports buffer under-run free recording");
|
||||||
|
|
||||||
mmcOneValue.Sort();
|
mmcOneValue.Sort();
|
||||||
mmcOneValue.Add("");
|
mmcOneValue.Add("");
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ using System.Collections.Generic;
|
|||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
public static class ScsiModeSense
|
public static class ScsiModeSense
|
||||||
{
|
{
|
||||||
@@ -47,15 +47,15 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// <param name="deviceType">SCSI peripheral device type</param>
|
/// <param name="deviceType">SCSI peripheral device type</param>
|
||||||
/// <param name="scsiOneValue">List to put values on</param>
|
/// <param name="scsiOneValue">List to put values on</param>
|
||||||
/// <param name="modePages">List to put key=value pairs on</param>
|
/// <param name="modePages">List to put key=value pairs on</param>
|
||||||
public static void Report(modeType modeSense, string vendor,
|
public static void Report(ScsiMode modeSense, string vendor,
|
||||||
PeripheralDeviceTypes deviceType,
|
PeripheralDeviceTypes deviceType,
|
||||||
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
|
||||||
{
|
{
|
||||||
if(modeSense.MediumTypeSpecified) scsiOneValue.Add($"Medium type is {modeSense.MediumType:X2}h");
|
if(modeSense.MediumType.HasValue) scsiOneValue.Add($"Medium type is {modeSense.MediumType:X2}h");
|
||||||
if(modeSense.WriteProtected) scsiOneValue.Add("Device is write protected.");
|
if(modeSense.WriteProtected) scsiOneValue.Add("Device is write protected.");
|
||||||
if(modeSense.BlockDescriptors != null)
|
if(modeSense.BlockDescriptors != null)
|
||||||
foreach(blockDescriptorType descriptor in modeSense.BlockDescriptors)
|
foreach(BlockDescriptor descriptor in modeSense.BlockDescriptors)
|
||||||
if(descriptor.BlocksSpecified && descriptor.BlockLengthSpecified)
|
if(descriptor.Blocks.HasValue && descriptor.BlockLength.HasValue)
|
||||||
scsiOneValue
|
scsiOneValue
|
||||||
.Add($"Density code {descriptor.Density:X2}h has {descriptor.Blocks} blocks of {descriptor.BlockLength} bytes each");
|
.Add($"Density code {descriptor.Density:X2}h has {descriptor.Blocks} blocks of {descriptor.BlockLength} bytes each");
|
||||||
else
|
else
|
||||||
@@ -63,7 +63,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
|
|
||||||
if(modeSense.DPOandFUA) scsiOneValue.Add("Drive supports DPO and FUA bits");
|
if(modeSense.DPOandFUA) scsiOneValue.Add("Drive supports DPO and FUA bits");
|
||||||
if(modeSense.BlankCheckEnabled) scsiOneValue.Add("Blank checking during write is enabled");
|
if(modeSense.BlankCheckEnabled) scsiOneValue.Add("Blank checking during write is enabled");
|
||||||
if(modeSense.BufferedModeSpecified)
|
if(modeSense.BufferedMode.HasValue)
|
||||||
switch(modeSense.BufferedMode)
|
switch(modeSense.BufferedMode)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -82,7 +82,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
|
|
||||||
if(modeSense.ModePages == null) return;
|
if(modeSense.ModePages == null) return;
|
||||||
|
|
||||||
foreach(modePageType page in modeSense.ModePages)
|
foreach(ScsiPage page in modeSense.ModePages)
|
||||||
switch(page.page)
|
switch(page.page)
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@@ -170,7 +170,8 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
if(page.subpage == 0)
|
if(page.subpage == 0)
|
||||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0A(page.value));
|
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0A(page.value));
|
||||||
else if(page.subpage == 1)
|
else if(page.subpage == 1)
|
||||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_0A_S01(page.value));
|
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||||
|
Modes.PrettifyModePage_0A_S01(page.value));
|
||||||
else goto default;
|
else goto default;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -241,7 +242,8 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
if(page.subpage == 0)
|
if(page.subpage == 0)
|
||||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1A(page.value));
|
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1A(page.value));
|
||||||
else if(page.subpage == 1)
|
else if(page.subpage == 1)
|
||||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1A_S01(page.value));
|
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||||
|
Modes.PrettifyModePage_1A_S01(page.value));
|
||||||
else goto default;
|
else goto default;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -262,7 +264,8 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
? Modes.PrettifyModePage_1C_SFF(page.value)
|
? Modes.PrettifyModePage_1C_SFF(page.value)
|
||||||
: Modes.PrettifyModePage_1C(page.value));
|
: Modes.PrettifyModePage_1C(page.value));
|
||||||
else if(page.subpage == 1)
|
else if(page.subpage == 1)
|
||||||
modePages.Add($"MODE page {page.page:X2}h", Modes.PrettifyModePage_1C_S01(page.value));
|
modePages.Add($"MODE page {page.page:X2}h subpage {page.subpage:X2}h",
|
||||||
|
Modes.PrettifyModePage_1C_S01(page.value));
|
||||||
else goto default;
|
else goto default;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -369,10 +372,8 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
|
|
||||||
Dictionary<string, string> newModePages = new Dictionary<string, string>();
|
Dictionary<string, string> newModePages = new Dictionary<string, string>();
|
||||||
foreach(KeyValuePair<string, string> kvp in modePages)
|
foreach(KeyValuePair<string, string> kvp in modePages)
|
||||||
if(string.IsNullOrWhiteSpace(kvp.Value))
|
newModePages.Add(kvp.Key,
|
||||||
newModePages.Add(kvp.Key, "Undecoded");
|
string.IsNullOrWhiteSpace(kvp.Value) ? "Undecoded" : kvp.Value.Replace("\n", "<br/>"));
|
||||||
else
|
|
||||||
newModePages.Add(kvp.Key, kvp.Value.Replace("\n", "<br/>"));
|
|
||||||
|
|
||||||
modePages = newModePages;
|
modePages = newModePages;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server
|
||||||
{
|
{
|
||||||
public static class SscTestedMedia
|
public static class SscTestedMedia
|
||||||
{
|
{
|
||||||
@@ -42,16 +42,16 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mediaOneValue">List to put values on</param>
|
/// <param name="mediaOneValue">List to put values on</param>
|
||||||
/// <param name="testedMedia">List of tested media</param>
|
/// <param name="testedMedia">List of tested media</param>
|
||||||
public static void Report(IEnumerable<SequentialMedia> testedMedia, ref List<string> mediaOneValue)
|
public static void Report(IEnumerable<TestedSequentialMedia> testedMedia, ref List<string> mediaOneValue)
|
||||||
{
|
{
|
||||||
foreach(SequentialMedia media in testedMedia)
|
foreach(TestedSequentialMedia media in testedMedia)
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
if(!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
||||||
{
|
{
|
||||||
mediaOneValue.Add($"<i>Information for medium named \"{media.MediumTypeName}\"</i>");
|
mediaOneValue.Add($"<i>Information for medium named \"{media.MediumTypeName}\"</i>");
|
||||||
if(media.MediumTypeSpecified) mediaOneValue.Add($"Medium type code: {media.MediumType:X2}h");
|
if(media.MediumType.HasValue) mediaOneValue.Add($"Medium type code: {media.MediumType:X2}h");
|
||||||
}
|
}
|
||||||
else if(media.MediumTypeSpecified)
|
else if(media.MediumType.HasValue)
|
||||||
mediaOneValue.Add($"<i>Information for medium type {media.MediumType:X2}h</i>");
|
mediaOneValue.Add($"<i>Information for medium type {media.MediumType:X2}h</i>");
|
||||||
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||||
|
|
||||||
@@ -59,9 +59,9 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
mediaOneValue.Add($"Medium manufactured by: {media.Manufacturer}");
|
mediaOneValue.Add($"Medium manufactured by: {media.Manufacturer}");
|
||||||
if(!string.IsNullOrWhiteSpace(media.Model)) mediaOneValue.Add($"Medium model: {media.Model}");
|
if(!string.IsNullOrWhiteSpace(media.Model)) mediaOneValue.Add($"Medium model: {media.Model}");
|
||||||
|
|
||||||
if(media.DensitySpecified) mediaOneValue.Add($"Medium has density code {media.Density:X2}h");
|
if(media.Density.HasValue) mediaOneValue.Add($"Medium has density code {media.Density:X2}h");
|
||||||
if(media.CanReadMediaSerial) mediaOneValue.Add("Drive can read medium serial number.");
|
if(media.CanReadMediaSerial == true) mediaOneValue.Add("Drive can read medium serial number.");
|
||||||
if(media.MediaIsRecognized) mediaOneValue.Add("DiscImageChef recognizes this medium.");
|
if(media.MediaIsRecognized) mediaOneValue.Add("Drive recognizes this medium.");
|
||||||
|
|
||||||
mediaOneValue.Add("");
|
mediaOneValue.Add("");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
|
||||||
|
|
||||||
namespace DiscImageChef.Server.App_Start
|
namespace DiscImageChef.Server.App_Start
|
||||||
{
|
{
|
||||||
@@ -43,17 +42,17 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
/// <param name="ata"><c>true</c> if device report is from an ATA device</param>
|
/// <param name="ata"><c>true</c> if device report is from an ATA device</param>
|
||||||
/// <param name="mediaOneValue">List to put values on</param>
|
/// <param name="mediaOneValue">List to put values on</param>
|
||||||
/// <param name="testedMedias">List of tested media</param>
|
/// <param name="testedMedias">List of tested media</param>
|
||||||
public static void Report(IEnumerable<testedMediaType> testedMedias, bool ata, ref List<string> mediaOneValue)
|
public static void Report(List<CommonTypes.Metadata.TestedMedia> testedMedias, ref List<string> mediaOneValue)
|
||||||
{
|
{
|
||||||
foreach(testedMediaType testedMedia in testedMedias)
|
foreach(CommonTypes.Metadata.TestedMedia testedMedia in testedMedias)
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(testedMedia.MediumTypeName))
|
if(!string.IsNullOrWhiteSpace(testedMedia.MediumTypeName))
|
||||||
{
|
{
|
||||||
mediaOneValue.Add($"<i>Information for medium named \"{testedMedia.MediumTypeName}\"</i>");
|
mediaOneValue.Add($"<i>Information for medium named \"{testedMedia.MediumTypeName}\"</i>");
|
||||||
if(testedMedia.MediumTypeSpecified)
|
if(testedMedia.MediumType != null)
|
||||||
mediaOneValue.Add($"Medium type code: {testedMedia.MediumType:X2}h");
|
mediaOneValue.Add($"Medium type code: {testedMedia.MediumType:X2}h");
|
||||||
}
|
}
|
||||||
else if(testedMedia.MediumTypeSpecified)
|
else if(testedMedia.MediumType != null)
|
||||||
mediaOneValue.Add($"<i>Information for medium type {testedMedia.MediumType:X2}h</i>");
|
mediaOneValue.Add($"<i>Information for medium type {testedMedia.MediumType:X2}h</i>");
|
||||||
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
||||||
|
|
||||||
@@ -65,16 +64,16 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
mediaOneValue.Add($"Medium manufactured by: {testedMedia.Manufacturer}");
|
mediaOneValue.Add($"Medium manufactured by: {testedMedia.Manufacturer}");
|
||||||
if(!string.IsNullOrWhiteSpace(testedMedia.Model))
|
if(!string.IsNullOrWhiteSpace(testedMedia.Model))
|
||||||
mediaOneValue.Add($"Medium model: {testedMedia.Model}");
|
mediaOneValue.Add($"Medium model: {testedMedia.Model}");
|
||||||
if(testedMedia.DensitySpecified) mediaOneValue.Add($"Density code: {testedMedia.Density:X2}h");
|
if(testedMedia.Density != null) mediaOneValue.Add($"Density code: {testedMedia.Density:X2}h");
|
||||||
|
|
||||||
if(testedMedia.BlockSizeSpecified)
|
if(testedMedia.BlockSize != null)
|
||||||
mediaOneValue.Add($"Logical sector size: {testedMedia.BlockSize} bytes");
|
mediaOneValue.Add($"Logical sector size: {testedMedia.BlockSize} bytes");
|
||||||
if(testedMedia.PhysicalBlockSizeSpecified)
|
if(testedMedia.PhysicalBlockSize != null)
|
||||||
mediaOneValue.Add($"Physical sector size: {testedMedia.PhysicalBlockSize} bytes");
|
mediaOneValue.Add($"Physical sector size: {testedMedia.PhysicalBlockSize} bytes");
|
||||||
if(testedMedia.LongBlockSizeSpecified)
|
if(testedMedia.LongBlockSize != null)
|
||||||
mediaOneValue.Add($"READ LONG sector size: {testedMedia.LongBlockSize} bytes");
|
mediaOneValue.Add($"READ LONG sector size: {testedMedia.LongBlockSize} bytes");
|
||||||
|
|
||||||
if(testedMedia.BlocksSpecified && testedMedia.BlockSizeSpecified)
|
if(testedMedia.Blocks != null && testedMedia.BlockSize != null)
|
||||||
{
|
{
|
||||||
mediaOneValue.Add($"Medium has {testedMedia.Blocks} blocks of {testedMedia.BlockSize} bytes each");
|
mediaOneValue.Add($"Medium has {testedMedia.Blocks} blocks of {testedMedia.BlockSize} bytes each");
|
||||||
|
|
||||||
@@ -114,7 +113,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
.Add($"Medium size in CHS mode: {(ulong)currentSectors * testedMedia.BlockSize} bytes, {(ulong)currentSectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(testedMedia.LBASectorsSpecified)
|
if(testedMedia.LBASectors != null)
|
||||||
{
|
{
|
||||||
mediaOneValue.Add($"Sectors addressable in sectors in 28-bit LBA mode: {testedMedia.LBASectors}");
|
mediaOneValue.Add($"Sectors addressable in sectors in 28-bit LBA mode: {testedMedia.LBASectors}");
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
.Add($"Medium size in 28-bit LBA mode: {(ulong)testedMedia.LBASectors * testedMedia.BlockSize} bytes, {(ulong)testedMedia.LBASectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)((ulong)testedMedia.LBASectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(testedMedia.LBA48SectorsSpecified)
|
if(testedMedia.LBA48Sectors != null)
|
||||||
{
|
{
|
||||||
mediaOneValue.Add($"Sectors addressable in sectors in 48-bit LBA mode: {testedMedia.LBA48Sectors}");
|
mediaOneValue.Add($"Sectors addressable in sectors in 48-bit LBA mode: {testedMedia.LBA48Sectors}");
|
||||||
|
|
||||||
@@ -144,155 +143,161 @@ namespace DiscImageChef.Server.App_Start
|
|||||||
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
.Add($"Medium size in 48-bit LBA mode: {testedMedia.LBA48Sectors * testedMedia.BlockSize} bytes, {testedMedia.LBA48Sectors * testedMedia.BlockSize / 1000 / 1000} Mb, {(double)(testedMedia.LBA48Sectors * testedMedia.BlockSize) / 1024 / 1024:F2} MiB");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(testedMedia.NominalRotationRateSpecified && testedMedia.NominalRotationRate != 0x0000 &&
|
if(testedMedia.NominalRotationRate != null && testedMedia.NominalRotationRate != 0x0000 &&
|
||||||
testedMedia.NominalRotationRate != 0xFFFF)
|
testedMedia.NominalRotationRate != 0xFFFF)
|
||||||
mediaOneValue.Add(testedMedia.NominalRotationRate == 0x0001
|
mediaOneValue.Add(testedMedia.NominalRotationRate == 0x0001
|
||||||
? "Medium does not rotate."
|
? "Medium does not rotate."
|
||||||
: $"Medium rotates at {testedMedia.NominalRotationRate} rpm");
|
: $"Medium rotates at {testedMedia.NominalRotationRate} rpm");
|
||||||
|
|
||||||
if(testedMedia.BlockSizeSpecified &&
|
if(testedMedia.BlockSize != null &&
|
||||||
testedMedia.PhysicalBlockSizeSpecified &&
|
testedMedia.PhysicalBlockSize != null &&
|
||||||
testedMedia.BlockSize != testedMedia.PhysicalBlockSize &&
|
testedMedia.BlockSize.Value != testedMedia.PhysicalBlockSize.Value &&
|
||||||
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
(testedMedia.LogicalAlignment & 0x8000) == 0x0000 &&
|
||||||
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
(testedMedia.LogicalAlignment & 0x4000) == 0x4000)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add($"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
.Add($"Logical sector starts at offset {testedMedia.LogicalAlignment & 0x3FFF} from physical sector");
|
||||||
|
|
||||||
if(testedMedia.SupportsRead && ata)
|
if(testedMedia.SupportsReadSectors == true)
|
||||||
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)
|
if(testedMedia.SupportsReadRetry == true)
|
||||||
mediaOneValue.Add("Device can use the READ SECTOR(S) RETRY command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the READ SECTOR(S) RETRY command in CHS mode with this medium");
|
||||||
if(testedMedia.SupportsReadDma)
|
if(testedMedia.SupportsReadDma == true)
|
||||||
mediaOneValue.Add("Device can use the READ DMA command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the READ DMA command in CHS mode with this medium");
|
||||||
if(testedMedia.SupportsReadDmaRetry)
|
if(testedMedia.SupportsReadDmaRetry == true)
|
||||||
mediaOneValue.Add("Device can use the READ DMA RETRY command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the READ DMA RETRY command in CHS mode with this medium");
|
||||||
if(testedMedia.SupportsReadLong && ata)
|
if(testedMedia.SupportsReadLong == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the READ LONG command in CHS mode with this medium");
|
||||||
if(testedMedia.SupportsReadLongRetry)
|
if(testedMedia.SupportsReadLongRetry == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG RETRY command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the READ LONG RETRY command in CHS mode with this medium");
|
||||||
|
|
||||||
if(testedMedia.SupportsReadLba)
|
if(testedMedia.SupportsReadLba == true)
|
||||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 28-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadRetryLba)
|
if(testedMedia.SupportsReadRetryLba == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
.Add("Device can use the READ SECTOR(S) RETRY command in 28-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadDmaLba)
|
if(testedMedia.SupportsReadDmaLba == true)
|
||||||
mediaOneValue.Add("Device can use the READ DMA command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ DMA command in 28-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadDmaRetryLba)
|
if(testedMedia.SupportsReadDmaRetryLba == true)
|
||||||
mediaOneValue.Add("Device can use the READ DMA RETRY command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ DMA RETRY command in 28-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadLongLba)
|
if(testedMedia.SupportsReadLongLba == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ LONG command in 28-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadLongRetryLba)
|
if(testedMedia.SupportsReadLongRetryLba == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG RETRY command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ LONG RETRY command in 28-bit LBA mode with this medium");
|
||||||
|
|
||||||
if(testedMedia.SupportsReadLba48)
|
if(testedMedia.SupportsReadLba48 == true)
|
||||||
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 48-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ SECTOR(S) command in 48-bit LBA mode with this medium");
|
||||||
if(testedMedia.SupportsReadDmaLba48)
|
if(testedMedia.SupportsReadDmaLba48 == true)
|
||||||
mediaOneValue.Add("Device can use the READ DMA command in 48-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the READ DMA command in 48-bit LBA mode with this medium");
|
||||||
|
|
||||||
if(testedMedia.SupportsSeek)
|
if(testedMedia.SupportsSeek == true)
|
||||||
mediaOneValue.Add("Device can use the SEEK command in CHS mode with this medium");
|
mediaOneValue.Add("Device can use the SEEK command in CHS mode with this medium");
|
||||||
if(testedMedia.SupportsSeekLba)
|
if(testedMedia.SupportsSeekLba == true)
|
||||||
mediaOneValue.Add("Device can use the SEEK command in 28-bit LBA mode with this medium");
|
mediaOneValue.Add("Device can use the SEEK command in 28-bit LBA mode with this medium");
|
||||||
|
|
||||||
if(testedMedia.SupportsReadCapacity)
|
if(testedMedia.SupportsReadCapacity == true)
|
||||||
mediaOneValue.Add("Device can use the READ CAPACITY (10) command with this medium");
|
mediaOneValue.Add("Device can use the READ CAPACITY (10) command with this medium");
|
||||||
if(testedMedia.SupportsReadCapacity16)
|
if(testedMedia.SupportsReadCapacity16 == true)
|
||||||
mediaOneValue.Add("Device can use the READ CAPACITY (16) command with this medium");
|
mediaOneValue.Add("Device can use the READ CAPACITY (16) command with this medium");
|
||||||
if(testedMedia.SupportsRead && !ata)
|
if(testedMedia.SupportsRead6 == true)
|
||||||
mediaOneValue.Add("Device can use the READ (6) command with this medium");
|
mediaOneValue.Add("Device can use the READ (6) command with this medium");
|
||||||
if(testedMedia.SupportsRead10)
|
if(testedMedia.SupportsRead10 == true)
|
||||||
mediaOneValue.Add("Device can use the READ (10) command with this medium");
|
mediaOneValue.Add("Device can use the READ (10) command with this medium");
|
||||||
if(testedMedia.SupportsRead12)
|
if(testedMedia.SupportsRead12 == true)
|
||||||
mediaOneValue.Add("Device can use the READ (12) command with this medium");
|
mediaOneValue.Add("Device can use the READ (12) command with this medium");
|
||||||
if(testedMedia.SupportsRead16)
|
if(testedMedia.SupportsRead16 == true)
|
||||||
mediaOneValue.Add("Device can use the READ (16) command with this medium");
|
mediaOneValue.Add("Device can use the READ (16) command with this medium");
|
||||||
if(testedMedia.SupportsReadLong && !ata)
|
if(testedMedia.SupportsReadLong == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG (10) command with this medium");
|
mediaOneValue.Add("Device can use the READ LONG (10) command with this medium");
|
||||||
if(testedMedia.SupportsReadLong16)
|
if(testedMedia.SupportsReadLong16 == true)
|
||||||
mediaOneValue.Add("Device can use the READ LONG (16) command with this medium");
|
mediaOneValue.Add("Device can use the READ LONG (16) command with this medium");
|
||||||
|
|
||||||
if(testedMedia.SupportsReadCd)
|
if(testedMedia.SupportsReadCd == true)
|
||||||
mediaOneValue.Add("Device can use the READ CD command with LBA addressing with this medium");
|
mediaOneValue.Add("Device can use the READ CD command with LBA addressing with this medium");
|
||||||
if(testedMedia.SupportsReadCdMsf)
|
if(testedMedia.SupportsReadCdMsf == true)
|
||||||
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium");
|
mediaOneValue.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium");
|
||||||
if(testedMedia.SupportsReadCdRaw)
|
if(testedMedia.SupportsReadCdRaw == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
.Add("Device can use the READ CD command with LBA addressing with this medium to read raw sector");
|
||||||
if(testedMedia.SupportsReadCdMsfRaw)
|
if(testedMedia.SupportsReadCdMsfRaw == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
.Add("Device can use the READ CD command with MM:SS:FF addressing with this medium read raw sector");
|
||||||
|
|
||||||
if(testedMedia.SupportsHLDTSTReadRawDVD)
|
if(testedMedia.SupportsHLDTSTReadRawDVD == true)
|
||||||
mediaOneValue.Add("Device can use the HL-DT-ST vendor READ DVD (RAW) command with this medium");
|
mediaOneValue.Add("Device can use the HL-DT-ST vendor READ DVD (RAW) command with this medium");
|
||||||
if(testedMedia.SupportsNECReadCDDA)
|
if(testedMedia.SupportsNECReadCDDA == true)
|
||||||
mediaOneValue.Add("Device can use the NEC vendor READ CD-DA command with this medium");
|
mediaOneValue.Add("Device can use the NEC vendor READ CD-DA command with this medium");
|
||||||
if(testedMedia.SupportsPioneerReadCDDA)
|
if(testedMedia.SupportsPioneerReadCDDA == true)
|
||||||
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA command with this medium");
|
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA command with this medium");
|
||||||
if(testedMedia.SupportsPioneerReadCDDAMSF)
|
if(testedMedia.SupportsPioneerReadCDDAMSF == true)
|
||||||
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA MSF command with this medium");
|
mediaOneValue.Add("Device can use the PIONEER vendor READ CD-DA MSF command with this medium");
|
||||||
if(testedMedia.SupportsPlextorReadCDDA)
|
if(testedMedia.SupportsPlextorReadCDDA == true)
|
||||||
mediaOneValue.Add("Device can use the PLEXTOR vendor READ CD-DA command with this medium");
|
mediaOneValue.Add("Device can use the PLEXTOR vendor READ CD-DA command with this medium");
|
||||||
if(testedMedia.SupportsPlextorReadRawDVD)
|
if(testedMedia.SupportsPlextorReadRawDVD == true)
|
||||||
mediaOneValue.Add("Device can use the PLEXOR vendor READ DVD (RAW) command with this medium");
|
mediaOneValue.Add("Device can use the PLEXOR vendor READ DVD (RAW) command with this medium");
|
||||||
|
|
||||||
if(testedMedia.CanReadAACS)
|
if(testedMedia.CanReadAACS == true)
|
||||||
mediaOneValue.Add("Device can read the Advanced Access Content System from this medium");
|
mediaOneValue.Add("Device can read the Advanced Access Content System from this medium");
|
||||||
if(testedMedia.CanReadADIP)
|
if(testedMedia.CanReadADIP == true)
|
||||||
mediaOneValue.Add("Device can read the DVD ADress-In-Pregroove from this medium");
|
mediaOneValue.Add("Device can read the DVD ADress-In-Pregroove from this medium");
|
||||||
if(testedMedia.CanReadATIP)
|
if(testedMedia.CanReadATIP == true)
|
||||||
mediaOneValue.Add("Device can read the CD Absolute-Time-In-Pregroove from this medium");
|
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 == true)
|
||||||
if(testedMedia.CanReadC2Pointers)
|
mediaOneValue.Add("Device can read the Burst Cutting Area from this medium");
|
||||||
|
if(testedMedia.CanReadC2Pointers == true)
|
||||||
mediaOneValue.Add("Device can report the C2 pointers when reading from this medium");
|
mediaOneValue.Add("Device can report the C2 pointers when reading from this medium");
|
||||||
if(testedMedia.CanReadCMI)
|
if(testedMedia.CanReadCMI == true)
|
||||||
mediaOneValue.Add("Device can read the Copyright Management Information from this medium");
|
mediaOneValue.Add("Device can read the Copyright Management Information from this medium");
|
||||||
if(testedMedia.CanReadCorrectedSubchannel)
|
if(testedMedia.CanReadCorrectedSubchannel == true)
|
||||||
mediaOneValue.Add("Device can correct subchannels when reading from this medium");
|
mediaOneValue.Add("Device can correct subchannels when reading from this medium");
|
||||||
if(testedMedia.CanReadCorrectedSubchannelWithC2)
|
if(testedMedia.CanReadCorrectedSubchannelWithC2 == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
.Add("Device can correct subchannels and report the C2 pointers when reading from this medium");
|
||||||
if(testedMedia.CanReadDCB)
|
if(testedMedia.CanReadDCB == true)
|
||||||
mediaOneValue.Add("Device can read the Disc Control Blocks from this medium");
|
mediaOneValue.Add("Device can read the Disc Control Blocks from this medium");
|
||||||
if(testedMedia.CanReadDDS)
|
if(testedMedia.CanReadDDS == true)
|
||||||
mediaOneValue.Add("Device can read the Disc Definition Structure from this medium");
|
mediaOneValue.Add("Device can read the Disc Definition Structure from this medium");
|
||||||
if(testedMedia.CanReadDMI)
|
if(testedMedia.CanReadDMI == true)
|
||||||
mediaOneValue.Add("Device can read the Disc Manufacurer Information from this medium");
|
mediaOneValue.Add("Device can read the Disc Manufacurer Information from this medium");
|
||||||
if(testedMedia.CanReadDiscInformation)
|
if(testedMedia.CanReadDiscInformation == true)
|
||||||
mediaOneValue.Add("Device can read the Disc Information from this medium");
|
mediaOneValue.Add("Device can read the Disc Information from this medium");
|
||||||
if(testedMedia.CanReadFullTOC)
|
if(testedMedia.CanReadFullTOC == true)
|
||||||
mediaOneValue.Add("Device can read the Table of Contents from this medium, without processing it");
|
mediaOneValue.Add("Device can read the Table of Contents from this medium, without processing it");
|
||||||
if(testedMedia.CanReadHDCMI)
|
if(testedMedia.CanReadHDCMI == true)
|
||||||
mediaOneValue.Add("Device can read the HD DVD Copyright Management Information from this medium");
|
mediaOneValue.Add("Device can read the HD DVD Copyright Management Information from this medium");
|
||||||
if(testedMedia.CanReadLayerCapacity)
|
if(testedMedia.CanReadLayerCapacity == true)
|
||||||
mediaOneValue.Add("Device can read the layer capacity from this medium");
|
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.CanReadFirstTrackPreGap == true)
|
||||||
if(testedMedia.CanReadLeadOut) mediaOneValue.Add("Device can read the Lead-Out from this medium");
|
mediaOneValue.Add("Device can read the first track's pregap data");
|
||||||
if(testedMedia.CanReadMediaID) mediaOneValue.Add("Device can read the Media ID from this medium");
|
if(testedMedia.CanReadLeadIn == true) mediaOneValue.Add("Device can read the Lead-In from this medium");
|
||||||
if(testedMedia.CanReadMediaSerial)
|
if(testedMedia.CanReadLeadOut == true)
|
||||||
|
mediaOneValue.Add("Device can read the Lead-Out from this medium");
|
||||||
|
if(testedMedia.CanReadMediaID == true)
|
||||||
|
mediaOneValue.Add("Device can read the Media ID from this medium");
|
||||||
|
if(testedMedia.CanReadMediaSerial == true)
|
||||||
mediaOneValue.Add("Device can read the Media Serial Number from this medium");
|
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 == true) mediaOneValue.Add("Device can read the PAC from this medium");
|
||||||
if(testedMedia.CanReadPFI)
|
if(testedMedia.CanReadPFI == true)
|
||||||
mediaOneValue.Add("Device can read the Physical Format Information from this medium");
|
mediaOneValue.Add("Device can read the Physical Format Information from this medium");
|
||||||
if(testedMedia.CanReadPMA)
|
if(testedMedia.CanReadPMA == true)
|
||||||
mediaOneValue.Add("Device can read the Power Management Area from this medium");
|
mediaOneValue.Add("Device can read the Power Management Area from this medium");
|
||||||
if(testedMedia.CanReadPQSubchannel)
|
if(testedMedia.CanReadPQSubchannel == true)
|
||||||
mediaOneValue.Add("Device can read the P to Q subchannels from this medium");
|
mediaOneValue.Add("Device can read the P to Q subchannels from this medium");
|
||||||
if(testedMedia.CanReadPQSubchannelWithC2)
|
if(testedMedia.CanReadPQSubchannelWithC2 == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
.Add("Device can read the P to Q subchannels from this medium reporting the C2 pointers");
|
||||||
if(testedMedia.CanReadPRI)
|
if(testedMedia.CanReadPRI == true)
|
||||||
mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium");
|
mediaOneValue.Add("Device can read the Pre-Recorded Information from this medium");
|
||||||
if(testedMedia.CanReadRWSubchannel)
|
if(testedMedia.CanReadRWSubchannel == true)
|
||||||
mediaOneValue.Add("Device can read the R to W subchannels from this medium");
|
mediaOneValue.Add("Device can read the R to W subchannels from this medium");
|
||||||
if(testedMedia.CanReadRWSubchannelWithC2)
|
if(testedMedia.CanReadRWSubchannelWithC2 == true)
|
||||||
mediaOneValue
|
mediaOneValue
|
||||||
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
.Add("Device can read the R to W subchannels from this medium reporting the C2 pointers");
|
||||||
if(testedMedia.CanReadRecordablePFI)
|
if(testedMedia.CanReadRecordablePFI == true)
|
||||||
mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium");
|
mediaOneValue.Add("Device can read the Physical Format Information from Lead-In from this medium");
|
||||||
if(testedMedia.CanReadSpareAreaInformation)
|
if(testedMedia.CanReadSpareAreaInformation == true)
|
||||||
mediaOneValue.Add("Device can read the Spare Area Information from this medium");
|
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 == true)
|
||||||
|
mediaOneValue.Add("Device can read the Table of Contents from this medium");
|
||||||
|
|
||||||
mediaOneValue.Add("");
|
mediaOneValue.Add("");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,6 +295,10 @@
|
|||||||
<Project>{0beb3088-b634-4289-ae17-cdf2d25d00d5}</Project>
|
<Project>{0beb3088-b634-4289-ae17-cdf2d25d00d5}</Project>
|
||||||
<Name>DiscImageChef.Decoders</Name>
|
<Name>DiscImageChef.Decoders</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj">
|
||||||
|
<Project>{f8bdf57b-1571-4cd0-84b3-b422088d359a}</Project>
|
||||||
|
<Name>DiscImageChef.Helpers</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Migrations\201812201613369_InitialMigration.resx">
|
<EmbeddedResource Include="Migrations\201812201613369_InitialMigration.resx">
|
||||||
|
|||||||
@@ -33,17 +33,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Hosting;
|
using System.Web.Hosting;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Xml.Serialization;
|
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
|
||||||
using DiscImageChef.Decoders.PCMCIA;
|
using DiscImageChef.Decoders.PCMCIA;
|
||||||
using DiscImageChef.Decoders.SCSI;
|
using DiscImageChef.Decoders.SCSI;
|
||||||
using DiscImageChef.Server.App_Start;
|
using DiscImageChef.Server.App_Start;
|
||||||
using Ata = DiscImageChef.Server.App_Start.Ata;
|
using DiscImageChef.Server.Models;
|
||||||
using TestedMedia = DiscImageChef.Server.App_Start.TestedMedia;
|
using TestedMedia = DiscImageChef.CommonTypes.Metadata.TestedMedia;
|
||||||
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
||||||
|
|
||||||
namespace DiscImageChef.Server
|
namespace DiscImageChef.Server
|
||||||
@@ -57,56 +55,24 @@ namespace DiscImageChef.Server
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string manufacturer = Request.QueryString["manufacturer"];
|
if(!int.TryParse(Request.QueryString["id"], out int id) || id <= 0)
|
||||||
string model = Request.QueryString["model"];
|
|
||||||
string revision = Request.QueryString["revision"];
|
|
||||||
|
|
||||||
// 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('?', '_');
|
|
||||||
if(model != null)
|
|
||||||
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('?', '_');
|
|
||||||
|
|
||||||
string xmlFile = null;
|
|
||||||
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";
|
|
||||||
|
|
||||||
if(xmlFile == null ||
|
|
||||||
!File.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
|
||||||
"Reports", xmlFile)))
|
|
||||||
{
|
{
|
||||||
content.InnerHtml = "<b>Could not find the specified report</b>";
|
content.InnerHtml = "<b>Incorrect device report request</b>";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lblManufacturer.Text = Request.QueryString["manufacturer"];
|
DicServerContext ctx = new DicServerContext();
|
||||||
lblModel.Text = Request.QueryString["model"];
|
Device report = ctx.Devices.FirstOrDefault(d => d.Id == id);
|
||||||
lblRevision.Text = Request.QueryString["revision"];
|
|
||||||
|
|
||||||
DeviceReport report = new DeviceReport();
|
if(report is null)
|
||||||
XmlSerializer xs = new XmlSerializer(report.GetType());
|
{
|
||||||
StreamReader sr =
|
content.InnerHtml = "<b>Cannot find requested report</b>";
|
||||||
new
|
return;
|
||||||
StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
}
|
||||||
"Reports", xmlFile));
|
|
||||||
report = (DeviceReport)xs.Deserialize(sr);
|
lblManufacturer.Text = report.Manufacturer;
|
||||||
sr.Close();
|
lblModel.Text = report.Model;
|
||||||
|
lblRevision.Text = report.Revision;
|
||||||
|
|
||||||
if(report.USB != null)
|
if(report.USB != null)
|
||||||
{
|
{
|
||||||
@@ -223,7 +189,7 @@ namespace DiscImageChef.Server
|
|||||||
else divPcmcia.Visible = false;
|
else divPcmcia.Visible = false;
|
||||||
|
|
||||||
bool removable = true;
|
bool removable = true;
|
||||||
testedMediaType[] testedMedia = null;
|
List<TestedMedia> testedMedia = null;
|
||||||
bool ata = false;
|
bool ata = false;
|
||||||
bool atapi = false;
|
bool atapi = false;
|
||||||
bool sscMedia = false;
|
bool sscMedia = false;
|
||||||
@@ -233,7 +199,7 @@ namespace DiscImageChef.Server
|
|||||||
ata = true;
|
ata = true;
|
||||||
List<string> ataOneValue = new List<string>();
|
List<string> ataOneValue = new List<string>();
|
||||||
Dictionary<string, string> ataTwoValue = new Dictionary<string, string>();
|
Dictionary<string, string> ataTwoValue = new Dictionary<string, string>();
|
||||||
ataType ataReport;
|
CommonTypes.Metadata.Ata ataReport;
|
||||||
|
|
||||||
if(report.ATAPI != null)
|
if(report.ATAPI != null)
|
||||||
{
|
{
|
||||||
@@ -243,7 +209,7 @@ namespace DiscImageChef.Server
|
|||||||
}
|
}
|
||||||
else ataReport = report.ATA;
|
else ataReport = report.ATA;
|
||||||
|
|
||||||
bool cfa = report.CompactFlashSpecified && report.CompactFlash;
|
bool cfa = report.CompactFlash;
|
||||||
|
|
||||||
if(atapi && !cfa) lblAtaDeviceType.Text = "ATAPI device";
|
if(atapi && !cfa) lblAtaDeviceType.Text = "ATAPI device";
|
||||||
else if(!atapi && cfa) lblAtaDeviceType.Text = "CompactFlash device";
|
else if(!atapi && cfa) lblAtaDeviceType.Text = "CompactFlash device";
|
||||||
@@ -264,13 +230,16 @@ namespace DiscImageChef.Server
|
|||||||
Dictionary<string, string> modePages = new Dictionary<string, string>();
|
Dictionary<string, string> modePages = new Dictionary<string, string>();
|
||||||
Dictionary<string, string> evpdPages = new Dictionary<string, string>();
|
Dictionary<string, string> evpdPages = new Dictionary<string, string>();
|
||||||
|
|
||||||
lblScsiVendor.Text =
|
string vendorId = StringHandlers.CToString(report.SCSI.Inquiry?.VendorIdentification);
|
||||||
VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification) !=
|
if(report.SCSI.Inquiry != null)
|
||||||
report.SCSI.Inquiry.VendorIdentification
|
{
|
||||||
? $"{report.SCSI.Inquiry.VendorIdentification} ({VendorString.Prettify(report.SCSI.Inquiry.VendorIdentification)})"
|
Inquiry.SCSIInquiry inq = report.SCSI.Inquiry.Value;
|
||||||
: report.SCSI.Inquiry.VendorIdentification;
|
lblScsiVendor.Text = VendorString.Prettify(vendorId) != vendorId
|
||||||
lblScsiProduct.Text = report.SCSI.Inquiry.ProductIdentification;
|
? $"{vendorId} ({VendorString.Prettify(vendorId)})"
|
||||||
lblScsiRevision.Text = report.SCSI.Inquiry.ProductRevisionLevel;
|
: vendorId;
|
||||||
|
lblScsiProduct.Text = StringHandlers.CToString(inq.ProductIdentification);
|
||||||
|
lblScsiRevision.Text = StringHandlers.CToString(inq.ProductRevisionLevel);
|
||||||
|
}
|
||||||
|
|
||||||
scsiOneValue.AddRange(ScsiInquiry.Report(report.SCSI.Inquiry));
|
scsiOneValue.AddRange(ScsiInquiry.Report(report.SCSI.Inquiry));
|
||||||
|
|
||||||
@@ -279,8 +248,12 @@ namespace DiscImageChef.Server
|
|||||||
if(report.SCSI.SupportsModeSubpages) scsiOneValue.Add("Device supports MODE SENSE subpages");
|
if(report.SCSI.SupportsModeSubpages) scsiOneValue.Add("Device supports MODE SENSE subpages");
|
||||||
|
|
||||||
if(report.SCSI.ModeSense != null)
|
if(report.SCSI.ModeSense != null)
|
||||||
ScsiModeSense.Report(report.SCSI.ModeSense, report.SCSI.Inquiry.VendorIdentification,
|
{
|
||||||
report.SCSI.Inquiry.PeripheralDeviceType, ref scsiOneValue, ref modePages);
|
PeripheralDeviceTypes devType = PeripheralDeviceTypes.DirectAccess;
|
||||||
|
if(report.SCSI.Inquiry != null)
|
||||||
|
devType = (PeripheralDeviceTypes)report.SCSI.Inquiry.Value.PeripheralDeviceType;
|
||||||
|
ScsiModeSense.Report(report.SCSI.ModeSense, vendorId, devType, ref scsiOneValue, ref modePages);
|
||||||
|
}
|
||||||
|
|
||||||
if(modePages.Count > 0)
|
if(modePages.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -289,8 +262,7 @@ namespace DiscImageChef.Server
|
|||||||
}
|
}
|
||||||
else divScsiModeSense.Visible = false;
|
else divScsiModeSense.Visible = false;
|
||||||
|
|
||||||
if(report.SCSI.EVPDPages != null)
|
if(report.SCSI.EVPDPages != null) ScsiEvpd.Report(report.SCSI.EVPDPages, vendorId, ref evpdPages);
|
||||||
ScsiEvpd.Report(report.SCSI.EVPDPages, report.SCSI.Inquiry.VendorIdentification, ref evpdPages);
|
|
||||||
|
|
||||||
if(evpdPages.Count > 0)
|
if(evpdPages.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -335,17 +307,14 @@ namespace DiscImageChef.Server
|
|||||||
{
|
{
|
||||||
divScsiSsc.Visible = true;
|
divScsiSsc.Visible = true;
|
||||||
|
|
||||||
lblScsiSscGranularity.Text = report.SCSI.SequentialDevice.BlockSizeGranularitySpecified
|
lblScsiSscGranularity.Text =
|
||||||
? report.SCSI.SequentialDevice.BlockSizeGranularity.ToString()
|
report.SCSI.SequentialDevice.BlockSizeGranularity?.ToString() ?? "Unspecified";
|
||||||
: "Unspecified";
|
|
||||||
|
|
||||||
lblScsiSscMaxBlock.Text = report.SCSI.SequentialDevice.MaxBlockLengthSpecified
|
lblScsiSscMaxBlock.Text =
|
||||||
? report.SCSI.SequentialDevice.MaxBlockLength.ToString()
|
report.SCSI.SequentialDevice.MaxBlockLength?.ToString() ?? "Unspecified";
|
||||||
: "Unspecified";
|
|
||||||
|
|
||||||
lblScsiSscMinBlock.Text = report.SCSI.SequentialDevice.MinBlockLengthSpecified
|
lblScsiSscMinBlock.Text =
|
||||||
? report.SCSI.SequentialDevice.MinBlockLength.ToString()
|
report.SCSI.SequentialDevice.MinBlockLength?.ToString() ?? "Unspecified";
|
||||||
: "Unspecified";
|
|
||||||
|
|
||||||
if(report.SCSI.SequentialDevice.SupportedDensities != null)
|
if(report.SCSI.SequentialDevice.SupportedDensities != null)
|
||||||
{
|
{
|
||||||
@@ -380,8 +349,8 @@ namespace DiscImageChef.Server
|
|||||||
removable = false;
|
removable = false;
|
||||||
scsiOneValue.Add("");
|
scsiOneValue.Add("");
|
||||||
|
|
||||||
if(report.SCSI.ReadCapabilities.BlocksSpecified &&
|
if(report.SCSI.ReadCapabilities.Blocks.HasValue &&
|
||||||
report.SCSI.ReadCapabilities.BlockSizeSpecified)
|
report.SCSI.ReadCapabilities.BlockSize.HasValue)
|
||||||
{
|
{
|
||||||
scsiOneValue
|
scsiOneValue
|
||||||
.Add($"Device has {report.SCSI.ReadCapabilities.Blocks} blocks of {report.SCSI.ReadCapabilities.BlockSize} bytes each");
|
.Add($"Device has {report.SCSI.ReadCapabilities.Blocks} blocks of {report.SCSI.ReadCapabilities.BlockSize} bytes each");
|
||||||
@@ -400,29 +369,29 @@ namespace DiscImageChef.Server
|
|||||||
.Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000} Mb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024:F2} MiB");
|
.Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000} Mb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024:F2} MiB");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(report.SCSI.ReadCapabilities.MediumTypeSpecified)
|
if(report.SCSI.ReadCapabilities.MediumType.HasValue)
|
||||||
scsiOneValue.Add($"Medium type code: {report.SCSI.ReadCapabilities.MediumType:X2}h");
|
scsiOneValue.Add($"Medium type code: {report.SCSI.ReadCapabilities.MediumType:X2}h");
|
||||||
if(report.SCSI.ReadCapabilities.DensitySpecified)
|
if(report.SCSI.ReadCapabilities.Density.HasValue)
|
||||||
scsiOneValue.Add($"Density code: {report.SCSI.ReadCapabilities.Density:X2}h");
|
scsiOneValue.Add($"Density code: {report.SCSI.ReadCapabilities.Density:X2}h");
|
||||||
if((report.SCSI.ReadCapabilities.SupportsReadLong ||
|
if((report.SCSI.ReadCapabilities.SupportsReadLong == true ||
|
||||||
report.SCSI.ReadCapabilities.SupportsReadLong16) &&
|
report.SCSI.ReadCapabilities.SupportsReadLong16 == true) &&
|
||||||
report.SCSI.ReadCapabilities.LongBlockSizeSpecified)
|
report.SCSI.ReadCapabilities.LongBlockSize.HasValue)
|
||||||
scsiOneValue.Add($"Long block size: {report.SCSI.ReadCapabilities.LongBlockSize} bytes");
|
scsiOneValue.Add($"Long block size: {report.SCSI.ReadCapabilities.LongBlockSize} bytes");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsReadCapacity)
|
if(report.SCSI.ReadCapabilities.SupportsReadCapacity == true)
|
||||||
scsiOneValue.Add("Device supports READ CAPACITY (10) command.");
|
scsiOneValue.Add("Device supports READ CAPACITY (10) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsReadCapacity16)
|
if(report.SCSI.ReadCapabilities.SupportsReadCapacity16 == true)
|
||||||
scsiOneValue.Add("Device supports READ CAPACITY (16) command.");
|
scsiOneValue.Add("Device supports READ CAPACITY (16) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsRead)
|
if(report.SCSI.ReadCapabilities.SupportsRead6 == true)
|
||||||
scsiOneValue.Add("Device supports READ (6) command.");
|
scsiOneValue.Add("Device supports READ (6) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsRead10)
|
if(report.SCSI.ReadCapabilities.SupportsRead10 == true)
|
||||||
scsiOneValue.Add("Device supports READ (10) command.");
|
scsiOneValue.Add("Device supports READ (10) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsRead12)
|
if(report.SCSI.ReadCapabilities.SupportsRead12 == true)
|
||||||
scsiOneValue.Add("Device supports READ (12) command.");
|
scsiOneValue.Add("Device supports READ (12) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsRead16)
|
if(report.SCSI.ReadCapabilities.SupportsRead16 == true)
|
||||||
scsiOneValue.Add("Device supports READ (16) command.");
|
scsiOneValue.Add("Device supports READ (16) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsReadLong)
|
if(report.SCSI.ReadCapabilities.SupportsReadLong == true)
|
||||||
scsiOneValue.Add("Device supports READ LONG (10) command.");
|
scsiOneValue.Add("Device supports READ LONG (10) command.");
|
||||||
if(report.SCSI.ReadCapabilities.SupportsReadLong16)
|
if(report.SCSI.ReadCapabilities.SupportsReadLong16 == true)
|
||||||
scsiOneValue.Add("Device supports READ LONG (16) command.");
|
scsiOneValue.Add("Device supports READ LONG (16) command.");
|
||||||
}
|
}
|
||||||
else testedMedia = report.SCSI.RemovableMedias;
|
else testedMedia = report.SCSI.RemovableMedias;
|
||||||
@@ -509,7 +478,7 @@ namespace DiscImageChef.Server
|
|||||||
if(removable && !sscMedia && testedMedia != null)
|
if(removable && !sscMedia && testedMedia != null)
|
||||||
{
|
{
|
||||||
List<string> mediaOneValue = new List<string>();
|
List<string> mediaOneValue = new List<string>();
|
||||||
TestedMedia.Report(testedMedia, ata, ref mediaOneValue);
|
App_Start.TestedMedia.Report(testedMedia, ref mediaOneValue);
|
||||||
if(mediaOneValue.Count > 0)
|
if(mediaOneValue.Count > 0)
|
||||||
{
|
{
|
||||||
divTestedMedia.Visible = true;
|
divTestedMedia.Visible = true;
|
||||||
|
|||||||
@@ -177,4 +177,6 @@
|
|||||||
</TypePattern>
|
</TypePattern>
|
||||||
</Patterns></s:String>
|
</Patterns></s:String>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ATAPI/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=ATAPI/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=EVPD/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Portillo/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
Reference in New Issue
Block a user