Check if unformattedbps is set, this may be readlong sector

size.
This commit is contained in:
2017-06-04 05:06:49 +01:00
parent e095e64c7c
commit 08d6082cd1

View File

@@ -646,6 +646,12 @@ namespace DiscImageChef.Core.Devices.Report
mediaTest.LongBlockSizeSpecified = true;
}
if(ataId.UnformattedBPS > logicalsectorsize && (!mediaTest.LongBlockSizeSpecified || mediaTest.LongBlockSize == 516))
{
mediaTest.LongBlockSize = ataId.UnformattedBPS;
mediaTest.LongBlockSizeSpecified = true;
}
if(ataId.CommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MustBeSet) &&
!ataId.CommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MustBeClear) &&
ataId.EnabledCommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MediaSerial))
@@ -940,6 +946,12 @@ namespace DiscImageChef.Core.Devices.Report
report.ATA.ReadCapabilities.LongBlockSizeSpecified = true;
}
if(ataId.UnformattedBPS > logicalsectorsize && (!report.ATA.ReadCapabilities.LongBlockSizeSpecified || report.ATA.ReadCapabilities.LongBlockSize == 516))
{
report.ATA.ReadCapabilities.LongBlockSize = ataId.UnformattedBPS;
report.ATA.ReadCapabilities.LongBlockSizeSpecified = true;
}
if(ataId.CommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MustBeSet) &&
!ataId.CommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MustBeClear) &&
ataId.EnabledCommandSet3.HasFlag(Decoders.ATA.Identify.CommandSetBit3.MediaSerial))