mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Clear ATA IDENTIFY DEVICE private fields on device report.
This commit is contained in:
@@ -53,7 +53,7 @@ namespace DiscImageChef.Core.Devices.Report
|
|||||||
DicConsole.WriteLine("Querying ATA IDENTIFY...");
|
DicConsole.WriteLine("Querying ATA IDENTIFY...");
|
||||||
dev.AtaIdentify(out byte[] buffer, out _, dev.Timeout, out _);
|
dev.AtaIdentify(out byte[] buffer, out _, dev.Timeout, out _);
|
||||||
|
|
||||||
mediaTest.IdentifyData = buffer;
|
mediaTest.IdentifyData = ClearIdentify(buffer);
|
||||||
mediaTest.IdentifyDevice = Identify.Decode(buffer);
|
mediaTest.IdentifyDevice = Identify.Decode(buffer);
|
||||||
|
|
||||||
if(mediaTest.IdentifyDevice.HasValue)
|
if(mediaTest.IdentifyDevice.HasValue)
|
||||||
@@ -584,7 +584,7 @@ namespace DiscImageChef.Core.Devices.Report
|
|||||||
return capabilities;
|
return capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
static byte[] ClearIdentify(byte[] buffer)
|
public static byte[] ClearIdentify(byte[] buffer)
|
||||||
{
|
{
|
||||||
byte[] empty = new byte[512];
|
byte[] empty = new byte[512];
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
if(!Identify.Decode(buffer).HasValue) break;
|
if(!Identify.Decode(buffer).HasValue) break;
|
||||||
|
|
||||||
report.ATA = new Ata {Identify = buffer};
|
report.ATA = new Ata {Identify = DeviceReport.ClearIdentify(buffer)};
|
||||||
|
|
||||||
if(report.ATA.IdentifyDevice == null) break;
|
if(report.ATA.IdentifyDevice == null) break;
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ namespace DiscImageChef.Commands
|
|||||||
System.Console.ReadKey(true);
|
System.Console.ReadKey(true);
|
||||||
DicConsole.WriteLine("Querying ATA IDENTIFY...");
|
DicConsole.WriteLine("Querying ATA IDENTIFY...");
|
||||||
dev.AtaIdentify(out buffer, out _, dev.Timeout, out _);
|
dev.AtaIdentify(out buffer, out _, dev.Timeout, out _);
|
||||||
report.ATA.Identify = buffer;
|
report.ATA.Identify = DeviceReport.ClearIdentify(buffer);
|
||||||
List<TestedMedia> mediaTests = new List<TestedMedia>();
|
List<TestedMedia> mediaTests = new List<TestedMedia>();
|
||||||
|
|
||||||
pressedKey = new ConsoleKeyInfo();
|
pressedKey = new ConsoleKeyInfo();
|
||||||
@@ -296,7 +296,8 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
dev.AtapiIdentify(out buffer, out _, dev.Timeout, out _);
|
dev.AtapiIdentify(out buffer, out _, dev.Timeout, out _);
|
||||||
|
|
||||||
if(Identify.Decode(buffer).HasValue) report.ATAPI = new Ata {Identify = buffer};
|
if(Identify.Decode(buffer).HasValue)
|
||||||
|
report.ATAPI = new Ata {Identify = DeviceReport.ClearIdentify(buffer)};
|
||||||
|
|
||||||
goto case DeviceType.SCSI;
|
goto case DeviceType.SCSI;
|
||||||
case DeviceType.SCSI:
|
case DeviceType.SCSI:
|
||||||
|
|||||||
Reference in New Issue
Block a user