Fix -C and -r to take optional arguments
This commit is contained in:
parent
01a3d2d8f6
commit
58174121f7
13
powertop-2.9-optional-args-fix.patch
Normal file
13
powertop-2.9-optional-args-fix.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 7467f0f..d1c18cc 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -441,7 +441,7 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
ui_notify_user = ui_notify_user_ncurses;
|
||||
while (1) { /* parse commandline options */
|
||||
- c = getopt_long(argc, argv, "cC:r:i:qt:w:Vh", long_options, &option_index);
|
||||
+ c = getopt_long(argc, argv, "cC::r::i:qt:w:Vh", long_options, &option_index);
|
||||
/* Detect the end of the options. */
|
||||
if (c == -1)
|
||||
break;
|
||||
@ -1,6 +1,6 @@
|
||||
Name: powertop
|
||||
Version: 2.9
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
@ -15,6 +15,7 @@ Patch1: powertop-2.9-cstates-rewrite-fix.patch
|
||||
Patch2: powertop-2.9-intel-glk-support.patch
|
||||
Patch3: powertop-2.9-intel-cnluy-support.patch
|
||||
Patch4: powertop-2.9-intel-cpu-check-aperf.patch
|
||||
Patch5: powertop-2.9-optional-args-fix.patch
|
||||
BuildRequires: gettext-devel, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: gcc, gcc-c++
|
||||
@ -38,6 +39,7 @@ computer use more power than necessary while it is idle.
|
||||
%patch3 -p1 -b .intel-cnluy-support
|
||||
# sent upstream
|
||||
%patch4 -p1 -b .intel-cpu-check-aperf
|
||||
%patch5 -p1 -b .optional-args-fix
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -74,6 +76,9 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.
|
||||
%{_unitdir}/powertop.service
|
||||
|
||||
%changelog
|
||||
* Wed Nov 28 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.9-10
|
||||
- Fix -C and -r to take optional arguments
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user