Show power consumption only if discharging
Resolves: rhbz#811949
This commit is contained in:
parent
3ab6652876
commit
042fbe64d9
12
powertop-1.98-show-watts-only-if-discharging.patch
Normal file
12
powertop-1.98-show-watts-only-if-discharging.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up powertop-1.98/measurement/measurement.cpp.orig powertop-1.98/measurement/measurement.cpp
|
||||
--- powertop-1.98/measurement/measurement.cpp.orig 2012-04-17 15:47:59.000000000 +0200
|
||||
+++ powertop-1.98/measurement/measurement.cpp 2012-04-17 15:49:31.690862740 +0200
|
||||
@@ -130,7 +130,7 @@ void power_supply_callback(const char *d
|
||||
while (file) {
|
||||
file.getline(line, 4096);
|
||||
|
||||
- if (strstr(line, "POWER_SUPPLY_STATUS") && strstr(line, "POWER_SUPPLY_STATUS"))
|
||||
+ if (strstr(line, "POWER_SUPPLY_STATUS") && strstr(line, "Discharging"))
|
||||
discharging = true;
|
||||
}
|
||||
file.close();
|
||||
@ -1,6 +1,6 @@
|
||||
Name: powertop
|
||||
Version: 1.98
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
@ -23,6 +23,7 @@ Patch5: powertop-1.98-power-supply-units-fix.patch
|
||||
# Accepted upstream
|
||||
Patch6: powertop-1.98-html-print-commands.patch
|
||||
Patch7: powertop-1.98-html-escape.patch
|
||||
Patch8: powertop-1.98-show-watts-only-if-discharging.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl-devel
|
||||
|
||||
@ -40,6 +41,7 @@ computer use more power than necessary while it is idle.
|
||||
%patch5 -p1 -b .power-supply-units-fix
|
||||
%patch6 -p1 -b .html-print-commands
|
||||
%patch7 -p1 -b .html-escape
|
||||
%patch8 -p1 -b .show-watts-only-if-discharging
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -72,6 +74,10 @@ rm -rf %{buildroot}
|
||||
#%{_mandir}/man8/powertop.8*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 17 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 1.98-9
|
||||
- Show power consumption only if discharging
|
||||
Resolves: rhbz#811949
|
||||
|
||||
* Tue Apr 03 2012 Jan Kaluza <jkaluza@redhat.com> - 1.98-8
|
||||
- Escape scripts in HTML output
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user