]> git.ipfire.org Git - ipfire-3.x.git/blob - powertop/patches/powertop-1.98-power-supply-units-fix.patch
openssl: Fix some unreliable lines in the makefile.
[ipfire-3.x.git] / powertop / patches / powertop-1.98-power-supply-units-fix.patch
1 diff -up powertop-1.98/measurement/power_supply.cpp.orig powertop-1.98/measurement/power_supply.cpp
2 --- powertop-1.98/measurement/power_supply.cpp.orig 2012-03-07 15:04:52.592471296 +0100
3 +++ powertop-1.98/measurement/power_supply.cpp 2012-03-07 15:07:27.743785210 +0100
4 @@ -157,7 +157,7 @@ void power_supply::measure(void)
5 file.close();
6
7 if(_voltage) {
8 - _voltage = _voltage / 1000.0;
9 + _voltage = _voltage / 1e6f;
10 voltage = _voltage;
11 } else {
12 voltage = 0.0;
13 @@ -165,10 +165,10 @@ void power_supply::measure(void)
14
15 if(_power_rate)
16 {
17 - rate = _power_rate / 1000000.0;
18 + rate = _power_rate / 1e6f;
19 }
20 else if(_current_rate) {
21 - _current_rate = _current_rate / 1000.0;
22 + _current_rate = _current_rate / 1e6f;
23 rate = _current_rate * _voltage;
24 } else {
25 rate = 0.0;