Hi all, The following 2 patches have been committed to CVS.
Bug fix:Some sensor will wrongfully report '0' as interpreted reading - Avoid treating '0' raw value as a special case. Now that, it's done, I wonder if users might get impacted by this so that's why I leave this trace on the list. The IPMI spec never says that '0' is an invalid raw value for an analog sensor. The very simple fact that you apply a conversion to the raw reading implies that it might translate to a nonzero interpreted reading. That's all, enjoy! cvs diff -u lib/ipmi_sensor.c isabe...@ipmitool.cvs.sourceforge.net's password: Index: lib/ipmi_sensor.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_sensor.c,v retrieving revision 1.35 diff -u -r1.35 ipmi_sensor.c --- lib/ipmi_sensor.c 4 Feb 2009 22:20:09 -0000 1.35 +++ lib/ipmi_sensor.c 5 Jun 2009 14:42:35 -0000 @@ -266,9 +266,9 @@ } /* convert RAW reading into units */ - val = (rsp->data[0] > 0) - ? sdr_convert_sensor_reading(sensor, rsp->data[0]) - : 0; + /* a raw reading of 0 is perfectly valid, and might be converted to a positive or + negative value, as any other raw values */ + val = sdr_convert_sensor_reading(sensor, rsp->data[0]); status = (char *) ipmi_sdr_get_status(sensor, rsp->data[2]); } Index: ipmi_sdr.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_sdr.c,v retrieving revision 1.89 diff -u -r1.89 ipmi_sdr.c --- ipmi_sdr.c 31 Jan 2009 01:10:18 -0000 1.89 +++ ipmi_sdr.c 5 Jun 2009 15:01:18 -0000 @@ -1180,7 +1180,7 @@ if (val != 0.0) validread = 1; } - } else if (rsp->data[0] != 0) { + } else { /* Non linear sensors might provide updated reading factors */ if (sensor->linearization>=SDR_SENSOR_L_NONLINEAR && sensor->linearization<=0x7F) { if (ipmi_sensor_get_sensor_reading_factors(intf, sensor, rsp->data[0]) < 0){ @@ -1188,9 +1188,7 @@ } } /* convert RAW reading into units */ - if (rsp->data[0] != 0) { val = sdr_convert_sensor_reading(sensor, rsp->data[0]); - } } } François Isabelle | Software Designer | Kontron Canada | T 450 437 5682 |F 450 437 8053 | E francois.isabe...@ca.kontron.com Prendre note que nous some déménagés // Please note that we moved. Nouvelle adresse // New address: Kontron Canada 4555 Rue Ambroise-Lafortune Boisbriand (Québec) J7H 0A4 L'information contenue dans le présent document est la propriété de Kontron Canada Inc. et est divulguée en toute confidentialité. Cette information ne doit pas être utilisée, divulguée ou reproduite sans le consentement écrit explicite de Kontron Canada Inc. Si vous n'êtes pas le destinataire prévu et avez reçu cette communication par erreur, veuillez contacter l'originateur et supprimer toute copie. The information contained in this document is confidential and property of Kontron Canada Inc. Any unauthorized review, use, disclosure or distribution is prohibited without express written consent of Kontron Canada Inc. If you are not the intended recipient, please contact the sender and destroy all copies of the original message and enclosed attachments. ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel