mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add support for showing devices without current CHS.
This commit is contained in:
@@ -1673,6 +1673,7 @@ ataReport.CommandSet3.HasFlag(CommandSetBit3.Streaming))
|
||||
if(ataReport.ReadCapabilities != null)
|
||||
{
|
||||
removable = false;
|
||||
ataOneValue.Add("");
|
||||
|
||||
if(ataReport.ReadCapabilities.NominalRotationRateSpecified &&
|
||||
ataReport.ReadCapabilities.NominalRotationRate != 0x0000 &&
|
||||
@@ -1707,7 +1708,7 @@ ataReport.CommandSet3.HasFlag(CommandSetBit3.Streaming))
|
||||
}
|
||||
|
||||
if(ataReport.ReadCapabilities.CHS != null &&
|
||||
ataReport.ReadCapabilities.CurrentCHS != null)
|
||||
ataReport.ReadCapabilities.CurrentCHS != null)
|
||||
{
|
||||
int currentSectors = ataReport.ReadCapabilities.CurrentCHS.Cylinders * ataReport.ReadCapabilities.CurrentCHS.Heads * ataReport.ReadCapabilities.CurrentCHS.Sectors;
|
||||
ataTwoValue.Add("Cylinders", string.Format("{0} max., {1} current", ataReport.ReadCapabilities.CHS.Cylinders, ataReport.ReadCapabilities.CurrentCHS.Cylinders));
|
||||
@@ -1718,6 +1719,16 @@ ataReport.ReadCapabilities.CurrentCHS != null)
|
||||
ataTwoValue.Add("Device size in CHS mode", string.Format("{0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * logicalsectorsize,
|
||||
((ulong)currentSectors * logicalsectorsize) / 1000 / 1000, (double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024));
|
||||
}
|
||||
else if(ataReport.ReadCapabilities.CHS != null)
|
||||
{
|
||||
int currentSectors = ataReport.ReadCapabilities.CHS.Cylinders * ataReport.ReadCapabilities.CHS.Heads * ataReport.ReadCapabilities.CHS.Sectors;
|
||||
ataTwoValue.Add("Cylinders", string.Format("{0}", ataReport.ReadCapabilities.CHS.Cylinders));
|
||||
ataTwoValue.Add("Heads", string.Format("{0}", ataReport.ReadCapabilities.CHS.Heads));
|
||||
ataTwoValue.Add("Sectors per track", string.Format("{0}", ataReport.ReadCapabilities.CHS.Sectors));
|
||||
ataTwoValue.Add("Sectors addressable in CHS mode", string.Format("{0}", currentSectors));
|
||||
ataTwoValue.Add("Device size in CHS mode", string.Format("{0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * logicalsectorsize,
|
||||
((ulong)currentSectors * logicalsectorsize) / 1000 / 1000, (double)((ulong)currentSectors * logicalsectorsize) / 1024 / 1024));
|
||||
}
|
||||
|
||||
if(ataReport.ReadCapabilities.LBASectorsSpecified)
|
||||
{
|
||||
|
||||
@@ -108,6 +108,16 @@ namespace DiscImageChef.Server.App_Start
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000, (double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
}
|
||||
else if(testedMedia.CHS != null)
|
||||
{
|
||||
int currentSectors = testedMedia.CHS.Cylinders * testedMedia.CHS.Heads * testedMedia.CHS.Sectors;
|
||||
mediaOneValue.Add(string.Format("Cylinders: {0}", testedMedia.CHS.Cylinders));
|
||||
mediaOneValue.Add(string.Format("Heads: {0}", testedMedia.CHS.Heads));
|
||||
mediaOneValue.Add(string.Format("Sectors per track: {0}", testedMedia.CHS.Sectors));
|
||||
mediaOneValue.Add(string.Format("Sectors addressable in CHS mode: {0}", currentSectors));
|
||||
mediaOneValue.Add(string.Format("Medium size in CHS mode: {0} bytes, {1} Mb, {2:F2} MiB", (ulong)currentSectors * testedMedia.BlockSize,
|
||||
((ulong)currentSectors * testedMedia.BlockSize) / 1000 / 1000, (double)((ulong)currentSectors * testedMedia.BlockSize) / 1024 / 1024));
|
||||
}
|
||||
|
||||
if(testedMedia.LBASectorsSpecified)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2017-06-05 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Ata.cs:
|
||||
* TestedMedia.cs: Add support for showing devices without
|
||||
current CHS.
|
||||
|
||||
2017-06-05 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Ata.cs:
|
||||
|
||||
Reference in New Issue
Block a user