mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 11:14:27 +00:00
Remove DiscImageChef.CommonTypes dependence on DiscImageChef.Decoders.
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.ATA;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -442,15 +442,15 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
// Serial number
|
||||
for(int i = 0; i < 20; i++)
|
||||
ata.Identify[10 * 2 + i] = 0x20;
|
||||
ata.Identify[(10 * 2) + i] = 0x20;
|
||||
|
||||
// Media serial number
|
||||
for(int i = 0; i < 40; i++)
|
||||
ata.Identify[176 * 2 + i] = 0x20;
|
||||
ata.Identify[(176 * 2) + i] = 0x20;
|
||||
|
||||
// WWN and WWN Extension
|
||||
for(int i = 0; i < 16; i++)
|
||||
ata.Identify[108 * 2 + i] = 0;
|
||||
ata.Identify[(108 * 2) + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
@@ -468,23 +468,23 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
// ReservedWords121
|
||||
for(int i = 0; i < 10; i++)
|
||||
ata.Identify[121 * 2 + i] = 0;
|
||||
ata.Identify[(121 * 2) + i] = 0;
|
||||
|
||||
// ReservedWords129
|
||||
for(int i = 0; i < 40; i++)
|
||||
ata.Identify[129 * 2 + i] = 0;
|
||||
ata.Identify[(129 * 2) + i] = 0;
|
||||
|
||||
// ReservedCFA
|
||||
for(int i = 0; i < 14; i++)
|
||||
ata.Identify[161 * 2 + i] = 0;
|
||||
ata.Identify[(161 * 2) + i] = 0;
|
||||
|
||||
// ReservedCEATA224
|
||||
for(int i = 0; i < 12; i++)
|
||||
ata.Identify[224 * 2 + i] = 0;
|
||||
ata.Identify[(224 * 2) + i] = 0;
|
||||
|
||||
// ReservedWords
|
||||
for(int i = 0; i < 14; i++)
|
||||
ata.Identify[161 * 2 + i] = 0;
|
||||
ata.Identify[(161 * 2) + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
@@ -502,15 +502,15 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
// Serial number
|
||||
for(int i = 0; i < 20; i++)
|
||||
ata.Identify[10 * 2 + i] = 0x20;
|
||||
ata.Identify[(10 * 2) + i] = 0x20;
|
||||
|
||||
// Media serial number
|
||||
for(int i = 0; i < 40; i++)
|
||||
ata.Identify[176 * 2 + i] = 0x20;
|
||||
ata.Identify[(176 * 2) + i] = 0x20;
|
||||
|
||||
// WWN and WWN Extension
|
||||
for(int i = 0; i < 16; i++)
|
||||
ata.Identify[108 * 2 + i] = 0;
|
||||
ata.Identify[(108 * 2) + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
@@ -527,23 +527,23 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
// ReservedWords121
|
||||
for(int i = 0; i < 10; i++)
|
||||
ata.Identify[121 * 2 + i] = 0;
|
||||
ata.Identify[(121 * 2) + i] = 0;
|
||||
|
||||
// ReservedWords129
|
||||
for(int i = 0; i < 40; i++)
|
||||
ata.Identify[129 * 2 + i] = 0;
|
||||
ata.Identify[(129 * 2) + i] = 0;
|
||||
|
||||
// ReservedCFA
|
||||
for(int i = 0; i < 14; i++)
|
||||
ata.Identify[161 * 2 + i] = 0;
|
||||
ata.Identify[(161 * 2) + i] = 0;
|
||||
|
||||
// ReservedCEATA224
|
||||
for(int i = 0; i < 12; i++)
|
||||
ata.Identify[224 * 2 + i] = 0;
|
||||
ata.Identify[(224 * 2) + i] = 0;
|
||||
|
||||
// ReservedWords
|
||||
for(int i = 0; i < 14; i++)
|
||||
ata.Identify[161 * 2 + i] = 0;
|
||||
ata.Identify[(161 * 2) + i] = 0;
|
||||
|
||||
// We need to tell EFCore the entity has changed
|
||||
_context.Update(ata);
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -189,8 +189,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Inquiry.SCSIInquiry? leftNullable = left.Inquiry;
|
||||
Inquiry.SCSIInquiry? rightNullable = right.Inquiry;
|
||||
Inquiry? leftNullable = left.Inquiry;
|
||||
Inquiry? rightNullable = right.Inquiry;
|
||||
model.ValueNames = new List<string>();
|
||||
model.LeftValues = new List<string>();
|
||||
model.RightValues = new List<string>();
|
||||
@@ -222,8 +222,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Inquiry.SCSIInquiry leftValue = left.Inquiry.Value;
|
||||
Inquiry.SCSIInquiry rightValue = right.Inquiry.Value;
|
||||
Inquiry leftValue = left.Inquiry.Value;
|
||||
Inquiry rightValue = right.Inquiry.Value;
|
||||
|
||||
foreach(FieldInfo fieldInfo in leftValue.GetType().GetFields())
|
||||
{
|
||||
@@ -265,14 +265,14 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
switch(fieldInfo.Name)
|
||||
{
|
||||
case nameof(Inquiry.SCSIInquiry.KreonIdentifier):
|
||||
case nameof(Inquiry.SCSIInquiry.ProductIdentification):
|
||||
case nameof(Inquiry.SCSIInquiry.ProductRevisionLevel):
|
||||
case nameof(Inquiry.SCSIInquiry.Qt_ModuleRevision):
|
||||
case nameof(Inquiry.SCSIInquiry.Seagate_Copyright):
|
||||
case nameof(Inquiry.SCSIInquiry.Seagate_DriveSerialNumber):
|
||||
case nameof(Inquiry.SCSIInquiry.Seagate_ServoPROMPartNo):
|
||||
case nameof(Inquiry.SCSIInquiry.VendorIdentification):
|
||||
case nameof(Inquiry.KreonIdentifier):
|
||||
case nameof(Inquiry.ProductIdentification):
|
||||
case nameof(Inquiry.ProductRevisionLevel):
|
||||
case nameof(Inquiry.Qt_ModuleRevision):
|
||||
case nameof(Inquiry.Seagate_Copyright):
|
||||
case nameof(Inquiry.Seagate_DriveSerialNumber):
|
||||
case nameof(Inquiry.Seagate_ServoPROMPartNo):
|
||||
case nameof(Inquiry.VendorIdentification):
|
||||
byte[] lb = new byte[ll.Count];
|
||||
byte[] rb = new byte[rl.Count];
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Decoders.Bluray;
|
||||
using DiscImageChef.Decoders.CD;
|
||||
|
||||
@@ -34,11 +34,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
using DiscImageChef.Decoders.PCMCIA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Inquiry = DiscImageChef.CommonTypes.Structs.Devices.SCSI.Inquiry;
|
||||
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
||||
|
||||
namespace DiscImageChef.Server.Controllers
|
||||
@@ -261,7 +263,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(report.SCSI.Inquiry != null)
|
||||
{
|
||||
Inquiry.SCSIInquiry inq = report.SCSI.Inquiry.Value;
|
||||
Inquiry inq = report.SCSI.Inquiry.Value;
|
||||
|
||||
ViewBag.lblScsiVendor = VendorString.Prettify(vendorId) != vendorId
|
||||
? $"{vendorId} ({VendorString.Prettify(vendorId)})" : vendorId;
|
||||
@@ -283,7 +285,7 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
if(report.SCSI.ModeSense != null)
|
||||
{
|
||||
var devType = PeripheralDeviceTypes.DirectAccess;
|
||||
PeripheralDeviceTypes devType = PeripheralDeviceTypes.DirectAccess;
|
||||
|
||||
if(report.SCSI.Inquiry != null)
|
||||
devType = (PeripheralDeviceTypes)report.SCSI.Inquiry.Value.PeripheralDeviceType;
|
||||
@@ -364,18 +366,18 @@ namespace DiscImageChef.Server.Controllers
|
||||
scsiOneValue.
|
||||
Add($"Device has {report.SCSI.ReadCapabilities.Blocks} blocks of {report.SCSI.ReadCapabilities.BlockSize} bytes each");
|
||||
|
||||
if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1024 /
|
||||
if((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 /
|
||||
1024 > 1000000)
|
||||
scsiOneValue.
|
||||
Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize /
|
||||
1024 /
|
||||
Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 / 1000 / 1000} Tb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if((report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) /
|
||||
1024 /
|
||||
1024 > 1000)
|
||||
scsiOneValue.
|
||||
Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize / 1000 / 1000 / 1000} Gb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
Add($"Device size: {report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize} bytes, {(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1000 / 1000 / 1000} Gb, {(double)(report.SCSI.ReadCapabilities.Blocks * report.SCSI.ReadCapabilities.BlockSize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
scsiOneValue.
|
||||
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.MediumType.HasValue)
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.ATA;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
@@ -708,22 +708,22 @@ namespace DiscImageChef.Server
|
||||
{
|
||||
case 1:
|
||||
ataOneValue.
|
||||
Add($"{ataIdentify.BufferSize * logicalsectorsize / 1024} KiB of single ported single sector buffer");
|
||||
Add($"{(ataIdentify.BufferSize * logicalsectorsize) / 1024} KiB of single ported single sector buffer");
|
||||
|
||||
break;
|
||||
case 2:
|
||||
ataOneValue.
|
||||
Add($"{ataIdentify.BufferSize * logicalsectorsize / 1024} KiB of dual ported multi sector buffer");
|
||||
Add($"{(ataIdentify.BufferSize * logicalsectorsize) / 1024} KiB of dual ported multi sector buffer");
|
||||
|
||||
break;
|
||||
case 3:
|
||||
ataOneValue.
|
||||
Add($"{ataIdentify.BufferSize * logicalsectorsize / 1024} KiB of dual ported multi sector buffer with read caching");
|
||||
Add($"{(ataIdentify.BufferSize * logicalsectorsize) / 1024} KiB of dual ported multi sector buffer with read caching");
|
||||
|
||||
break;
|
||||
default:
|
||||
ataOneValue.
|
||||
Add($"{ataIdentify.BufferSize * logicalsectorsize / 1024} KiB of unknown type {ataIdentify.BufferType} buffer");
|
||||
Add($"{(ataIdentify.BufferSize * logicalsectorsize) / 1024} KiB of unknown type {ataIdentify.BufferType} buffer");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1726,7 +1726,7 @@ namespace DiscImageChef.Server
|
||||
$"{ataReport.ReadCapabilities.CHS.Cylinders * ataReport.ReadCapabilities.CHS.Heads * ataReport.ReadCapabilities.CHS.Sectors} max., {currentSectors} current");
|
||||
|
||||
ataTwoValue.Add("Device size in CHS mode",
|
||||
$"{(ulong)currentSectors * logicalsectorsize} bytes, {(ulong)currentSectors * logicalsectorsize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
$"{(ulong)currentSectors * logicalsectorsize} bytes, {((ulong)currentSectors * logicalsectorsize) / 1000 / 1000} Mb, {(double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
else if(ataReport.ReadCapabilities.CHS != null)
|
||||
{
|
||||
@@ -1740,7 +1740,7 @@ namespace DiscImageChef.Server
|
||||
ataTwoValue.Add("Sectors addressable in CHS mode", $"{currentSectors}");
|
||||
|
||||
ataTwoValue.Add("Device size in CHS mode",
|
||||
$"{(ulong)currentSectors * logicalsectorsize} bytes, {(ulong)currentSectors * logicalsectorsize / 1000 / 1000} Mb, {(double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
$"{(ulong)currentSectors * logicalsectorsize} bytes, {((ulong)currentSectors * logicalsectorsize) / 1000 / 1000} Mb, {(double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(ataReport.ReadCapabilities.LBASectors != null)
|
||||
@@ -1748,15 +1748,15 @@ namespace DiscImageChef.Server
|
||||
ataTwoValue.Add("Sectors addressable in sectors in 28-bit LBA mode",
|
||||
$"{ataReport.ReadCapabilities.LBASectors}");
|
||||
|
||||
if((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
||||
if(((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 > 1000000)
|
||||
ataTwoValue.Add("Device size in 28-bit LBA mode",
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000} Tb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize / 1024 / 1024 > 1000)
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000} Tb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 > 1000)
|
||||
ataTwoValue.Add("Device size in 28-bit LBA mode",
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize / 1000 / 1000 / 1000} Gb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1000 / 1000 / 1000} Gb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
ataTwoValue.Add("Device size in 28-bit LBA mode",
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize / 1000 / 1000} Mb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
$"{(ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize} bytes, {((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1000 / 1000} Mb, {(double)((ulong)ataReport.ReadCapabilities.LBASectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(ataReport.ReadCapabilities.LBA48Sectors != null)
|
||||
@@ -1764,15 +1764,15 @@ namespace DiscImageChef.Server
|
||||
ataTwoValue.Add("Sectors addressable in sectors in 48-bit LBA mode",
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors}");
|
||||
|
||||
if(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize / 1024 / 1024 > 1000000)
|
||||
if((ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 > 1000000)
|
||||
ataTwoValue.Add("Device size in 48-bit LBA mode",
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize / 1000 / 1000 / 1000 / 1000} Tb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize / 1024 / 1024 > 1000)
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000 / 1000} Tb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024 / 1024:F2} TiB");
|
||||
else if((ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 > 1000)
|
||||
ataTwoValue.Add("Device size in 48-bit LBA mode",
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize / 1000 / 1000 / 1000} Gb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1000 / 1000 / 1000} Gb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024 / 1024:F2} GiB");
|
||||
else
|
||||
ataTwoValue.Add("Device size in 48-bit LBA mode",
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize / 1000 / 1000} Mb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
$"{ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize} bytes, {(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1000 / 1000} Mb, {(double)(ataReport.ReadCapabilities.LBA48Sectors * logicalsectorsize) / 1024 / 1024:F2} MiB");
|
||||
}
|
||||
|
||||
if(ata1 || cfa)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
@@ -43,14 +43,14 @@ namespace DiscImageChef.Server
|
||||
/// </summary>
|
||||
/// <param name="inquiryNullable">INQUIRY part of the report</param>
|
||||
/// <returns>List of values</returns>
|
||||
internal static IEnumerable<string> Report(Inquiry.SCSIInquiry? inquiryNullable)
|
||||
internal static IEnumerable<string> Report(Inquiry? inquiryNullable)
|
||||
{
|
||||
List<string> scsiOneValue = new List<string>();
|
||||
|
||||
if(!inquiryNullable.HasValue)
|
||||
return scsiOneValue;
|
||||
|
||||
Inquiry.SCSIInquiry inquiry = inquiryNullable.Value;
|
||||
Inquiry inquiry = inquiryNullable.Value;
|
||||
|
||||
switch((PeripheralQualifiers)inquiry.PeripheralQualifier)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
using DiscImageChef.Decoders.SCSI.MMC;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI.Modes;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
{
|
||||
@@ -44,7 +44,7 @@ namespace DiscImageChef.Server
|
||||
/// </summary>
|
||||
/// <param name="mode">MODE PAGE 2Ah part of the report</param>
|
||||
/// <param name="mmcOneValue">List to put the values on</param>
|
||||
public static void Report(Modes.ModePage_2A mode, ref List<string> mmcOneValue)
|
||||
public static void Report(ModePage_2A mode, ref List<string> mmcOneValue)
|
||||
{
|
||||
if(mode.AudioPlay)
|
||||
mmcOneValue.Add("Drive can play audio");
|
||||
@@ -196,7 +196,7 @@ namespace DiscImageChef.Server
|
||||
}
|
||||
|
||||
if(mode.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach(Modes.ModePage_2A_WriteDescriptor descriptor in
|
||||
foreach(ModePage_2A_WriteDescriptor descriptor in
|
||||
mode.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0))
|
||||
if(descriptor.RotationControl == 0)
|
||||
mmcOneValue.Add($"Drive supports writing at {descriptor.WriteSpeed} Kbyte/sec. in CLV mode");
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using DiscImageChef.CommonTypes.Structs.Devices.SCSI;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
|
||||
namespace DiscImageChef.Server
|
||||
|
||||
Reference in New Issue
Block a user