mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-31 14:25:16 +00:00
Fixed a division by zero in the Sandforce write amplification sensor.
This commit is contained in:
@@ -92,8 +92,11 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
|||||||
hostWritesToController = RawToInt(value.RawValue, value.AttrValue);
|
hostWritesToController = RawToInt(value.RawValue, value.AttrValue);
|
||||||
}
|
}
|
||||||
if (controllerWritesToNAND.HasValue && hostWritesToController.HasValue) {
|
if (controllerWritesToNAND.HasValue && hostWritesToController.HasValue) {
|
||||||
writeAmplification.Value =
|
if (hostWritesToController.Value > 0)
|
||||||
controllerWritesToNAND.Value / hostWritesToController.Value;
|
writeAmplification.Value =
|
||||||
|
controllerWritesToNAND.Value / hostWritesToController.Value;
|
||||||
|
else
|
||||||
|
writeAmplification.Value = 0;
|
||||||
ActivateSensor(writeAmplification);
|
ActivateSensor(writeAmplification);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -37,5 +37,5 @@
|
|||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.4.0.3")]
|
[assembly: AssemblyVersion("0.4.0.4")]
|
||||||
[assembly: AssemblyInformationalVersion("0.4.0.3 Alpha")]
|
[assembly: AssemblyInformationalVersion("0.4.0.4 Alpha")]
|
Reference in New Issue
Block a user