From 58174121f7aa59184123f533ff4193c884a0f243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 28 Nov 2018 18:33:42 +0100 Subject: [PATCH] Fix -C and -r to take optional arguments --- powertop-2.9-optional-args-fix.patch | 13 +++++++++++++ powertop.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 powertop-2.9-optional-args-fix.patch diff --git a/powertop-2.9-optional-args-fix.patch b/powertop-2.9-optional-args-fix.patch new file mode 100644 index 0000000..9f917f3 --- /dev/null +++ b/powertop-2.9-optional-args-fix.patch @@ -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; diff --git a/powertop.spec b/powertop.spec index 73bfb25..e754e4e 100644 --- a/powertop.spec +++ b/powertop.spec @@ -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 - 2.9-10 +- Fix -C and -r to take optional arguments + * Fri Jul 13 2018 Fedora Release Engineering - 2.9-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild