Fixed a division by zero in the Sandforce write amplification sensor.
1.1 --- a/Hardware/HDD/SSDSandforce.cs Wed Feb 22 23:32:06 2012 +0000
1.2 +++ b/Hardware/HDD/SSDSandforce.cs Wed Feb 22 23:36:26 2012 +0000
1.3 @@ -92,8 +92,11 @@
1.4 hostWritesToController = RawToInt(value.RawValue, value.AttrValue);
1.5 }
1.6 if (controllerWritesToNAND.HasValue && hostWritesToController.HasValue) {
1.7 - writeAmplification.Value =
1.8 - controllerWritesToNAND.Value / hostWritesToController.Value;
1.9 + if (hostWritesToController.Value > 0)
1.10 + writeAmplification.Value =
1.11 + controllerWritesToNAND.Value / hostWritesToController.Value;
1.12 + else
1.13 + writeAmplification.Value = 0;
1.14 ActivateSensor(writeAmplification);
1.15 }
1.16 }
2.1 --- a/Properties/AssemblyVersion.cs Wed Feb 22 23:32:06 2012 +0000
2.2 +++ b/Properties/AssemblyVersion.cs Wed Feb 22 23:36:26 2012 +0000
2.3 @@ -37,5 +37,5 @@
2.4
2.5 using System.Reflection;
2.6
2.7 -[assembly: AssemblyVersion("0.4.0.3")]
2.8 -[assembly: AssemblyInformationalVersion("0.4.0.3 Alpha")]
2.9 \ No newline at end of file
2.10 +[assembly: AssemblyVersion("0.4.0.4")]
2.11 +[assembly: AssemblyInformationalVersion("0.4.0.4 Alpha")]
2.12 \ No newline at end of file