[ipmiutil] patch for upstream bug 3429298 with Thermal Margin negative reading

arcress arcress at fedoraproject.org
Thu Oct 27 12:48:06 UTC 2011


commit 66a43d57f49548aa42977266e8cd1e0e01e3b782
Author: Andy Cress <arcress at users.sourceforge.net>
Date:   Thu Oct 27 08:43:28 2011 -0400

    patch for upstream bug 3429298 with Thermal Margin negative reading

 ipmiutil.spec                 |    4 +++-
 isensor-negative-margin.patch |   12 ++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/ipmiutil.spec b/ipmiutil.spec
index 6a747cb..424c542 100644
--- a/ipmiutil.spec
+++ b/ipmiutil.spec
@@ -1,6 +1,6 @@
 Name: ipmiutil
 Version: 2.7.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A package that provides easy-to-use IPMI server management utilities
 License: BSD
 Group: System/Management
@@ -8,6 +8,7 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 URL: http://ipmiutil.sourceforge.net
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: openssl-devel gcc gcc-c++
+Patch0: isensor-negative-margin.patch
 # Suggests: cron or vixie-cron or cronie or similar
 
 %description
@@ -24,6 +25,7 @@ detected, ipmiutil will use user-space direct I/Os instead.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
diff --git a/isensor-negative-margin.patch b/isensor-negative-margin.patch
new file mode 100644
index 0000000..d3fd9e2
--- /dev/null
+++ b/isensor-negative-margin.patch
@@ -0,0 +1,12 @@
+--- a/util/isensor.c	2011-10-27 08:04:12.000000000 -0400
++++ b/util/isensor.c	2011-10-26 11:00:46.000000000 -0400
+@@ -1544,7 +1544,8 @@
+ 	if ((sdr->sens_units & 0xc0) == 0) {  /*unsigned*/
+ 		floatval = (double)raw;
+ 	} else {  /*signed*/
+-		signval = raw;
++		if (raw & 0x80) signval = (raw - 0x100);
++		else signval = raw;
+ 		floatval = (double)signval;
+ 	}
+ 	floatval *= (double) m;


More information about the scm-commits mailing list