mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24: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;
|
||||
|
||||
Reference in New Issue
Block a user