mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Detect Kreon firmware.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2017-05-23 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Inquiry.cs: Detect Kreon firmware.
|
||||||
|
|
||||||
2017-05-19 Natalia Portillo <claunia@claunia.com>
|
2017-05-19 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* PMA.cs:
|
* PMA.cs:
|
||||||
|
|||||||
@@ -150,6 +150,18 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
decoded.Seagate_DriveSerialNumber = new byte[8];
|
decoded.Seagate_DriveSerialNumber = new byte[8];
|
||||||
Array.Copy(SCSIInquiryResponse, 36, decoded.Seagate_DriveSerialNumber, 0, 8);
|
Array.Copy(SCSIInquiryResponse, 36, decoded.Seagate_DriveSerialNumber, 0, 8);
|
||||||
}
|
}
|
||||||
|
if(SCSIInquiryResponse.Length >= 46)
|
||||||
|
{
|
||||||
|
// Kreon
|
||||||
|
decoded.KreonIdentifier = new byte[5];
|
||||||
|
Array.Copy(SCSIInquiryResponse, 36, decoded.KreonIdentifier, 0, 5);
|
||||||
|
decoded.KreonSpace = SCSIInquiryResponse[41];
|
||||||
|
decoded.KreonVersion = new byte[5];
|
||||||
|
Array.Copy(SCSIInquiryResponse, 42, decoded.KreonVersion, 0, 5);
|
||||||
|
|
||||||
|
if(decoded.KreonSpace == 0x20 && decoded.KreonIdentifier.SequenceEqual(new byte[] { 0x4B, 0x52, 0x45, 0x4F, 0x4E }))
|
||||||
|
decoded.KreonPresent = true;
|
||||||
|
}
|
||||||
if(SCSIInquiryResponse.Length >= 49)
|
if(SCSIInquiryResponse.Length >= 49)
|
||||||
{
|
{
|
||||||
// HP
|
// HP
|
||||||
@@ -2023,6 +2035,13 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
}
|
}
|
||||||
#endregion Seagate vendor prettifying
|
#endregion Seagate vendor prettifying
|
||||||
|
|
||||||
|
#region Kreon vendor prettifying
|
||||||
|
if(response.KreonPresent)
|
||||||
|
{
|
||||||
|
sb.AppendFormat("Drive is flashed with Kreon firmware {0}.", StringHandlers.CToString(response.KreonVersion)).AppendLine();
|
||||||
|
}
|
||||||
|
#endregion Kreon vendor prettifying
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if(response.DeviceTypeModifier != 0)
|
if(response.DeviceTypeModifier != 0)
|
||||||
sb.AppendFormat("Vendor's device type modifier = 0x{0:X2}", response.DeviceTypeModifier).AppendLine();
|
sb.AppendFormat("Vendor's device type modifier = 0x{0:X2}", response.DeviceTypeModifier).AppendLine();
|
||||||
@@ -2043,10 +2062,22 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
|
|
||||||
if(response.VendorSpecific != null)
|
if(response.VendorSpecific != null)
|
||||||
{
|
{
|
||||||
sb.AppendLine("Vendor-specific bytes 36 to 55");
|
if(response.KreonPresent)
|
||||||
sb.AppendLine("============================================================");
|
{
|
||||||
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.VendorSpecific, 60));
|
byte[] vendor = new byte[7];
|
||||||
sb.AppendLine("============================================================");
|
Array.Copy(response.VendorSpecific, 11, vendor, 0, 7);
|
||||||
|
sb.AppendLine("Vendor-specific bytes 47 to 55");
|
||||||
|
sb.AppendLine("============================================================");
|
||||||
|
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(vendor, 60));
|
||||||
|
sb.AppendLine("============================================================");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sb.AppendLine("Vendor-specific bytes 36 to 55");
|
||||||
|
sb.AppendLine("============================================================");
|
||||||
|
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.VendorSpecific, 60));
|
||||||
|
sb.AppendLine("============================================================");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(response.VendorSpecific2 != null)
|
if(response.VendorSpecific2 != null)
|
||||||
@@ -2478,6 +2509,28 @@ namespace DiscImageChef.Decoders.SCSI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] Seagate_ServoPROMPartNo;
|
public byte[] Seagate_ServoPROMPartNo;
|
||||||
#endregion Seagate vendor unique inquiry data structure
|
#endregion Seagate vendor unique inquiry data structure
|
||||||
|
|
||||||
|
#region Kreon vendor unique inquiry data structure
|
||||||
|
/// <summary>
|
||||||
|
/// Means that firmware is Kreon
|
||||||
|
/// </summary>
|
||||||
|
public bool KreonPresent;
|
||||||
|
/// <summary>
|
||||||
|
/// Kreon identifier
|
||||||
|
/// Bytes 36 to 40
|
||||||
|
/// </summary>
|
||||||
|
public byte[] KreonIdentifier;
|
||||||
|
/// <summary>
|
||||||
|
/// Kreon just a 0x20
|
||||||
|
/// Bytes 41
|
||||||
|
/// </summary>
|
||||||
|
public byte KreonSpace;
|
||||||
|
/// <summary>
|
||||||
|
/// Kreon version string
|
||||||
|
/// Bytes 42 to 46
|
||||||
|
/// </summary>
|
||||||
|
public byte[] KreonVersion;
|
||||||
|
#endregion Kreon vendor unique inquiry data structure
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Public structures
|
#endregion Public structures
|
||||||
|
|||||||
Reference in New Issue
Block a user