import powertop-2.12-2.el8

This commit is contained in:
CentOS Sources 2020-11-03 07:00:07 -05:00 committed by Andrew Lukoshko
parent 841af438bb
commit c8b6a5b506
4 changed files with 55 additions and 6 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/powertop-2.11.tar.gz
SOURCES/powertop-2.12.tar.gz

View File

@ -1 +1 @@
c39cec7fcb8a491f4e1bd26f1a7e6c28bb38f3c2 SOURCES/powertop-2.11.tar.gz
2b990862b223f81353baeab67c0c616d6122618d SOURCES/powertop-2.12.tar.gz

View File

@ -0,0 +1,37 @@
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 370b762..8af033b 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -155,8 +155,10 @@ void intel_util::byt_has_ahci()
if (!dir)
byt_ahci_support=0;
else
+ {
byt_ahci_support=1;
- closedir(dir);
+ closedir(dir);
+ }
}
int intel_util::get_byt_ahci_support()
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
index c958865..0509d0f 100644
--- a/src/devices/devfreq.cpp
+++ b/src/devices/devfreq.cpp
@@ -229,7 +229,6 @@ static void devfreq_dev_callback(const char *d_name)
void create_all_devfreq_devices(void)
{
- struct dirent *entry;
int num = 0;
std::string p = "/sys/class/devfreq/";
@@ -240,7 +239,7 @@ void create_all_devfreq_devices(void)
return;
}
- while((entry = readdir(dir)) != NULL)
+ while(readdir(dir) != NULL)
num++;
if (num == 2) {

View File

@ -1,6 +1,6 @@
Name: powertop
Version: 2.11
Release: 1%{?dist}
Version: 2.12
Release: 2%{?dist}
Summary: Power consumption monitor
Group: Applications/System
@ -11,8 +11,10 @@ Source1: powertop.service
# Sent upstream
Patch0: powertop-2.7-always-create-params.patch
# https://github.com/fenrus75/powertop/pull/46
Patch1: powertop-2.12-coverity-fixes.patch
BuildRequires: gettext-devel, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
BuildRequires: automake, libtool, systemd
BuildRequires: automake, libtool, systemd, autoconf-archive
BuildRequires: gcc, gcc-c++
Requires(post): systemd, coreutils
Requires(preun): systemd
@ -26,12 +28,14 @@ computer use more power than necessary while it is idle.
%prep
%setup -q
%patch0 -p1 -b .always-create-params
%patch1 -p1 -b .coverity-fixes
echo "v%{version}" > version-long
echo '"v%{version}"' > version-short
%build
autoreconf -fi
# workaround for rhbz#1826935
autoreconf -fi || autoreconf -fi
%configure
make %{?_smp_mflags} CFLAGS="%{optflags}"
@ -68,6 +72,14 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.
%{_datadir}/bash-completion/completions/powertop
%changelog
* Wed May 13 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 2.12-2
- Fixed two new issues found by coverity
Related: rhbz#1783110
* Wed May 13 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 2.12-1
- New version
Resolves: rhbz#1783110
* Fri Nov 1 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 2.11-1
- New version
Resolves: rhbz#1716721