Cache size was reported incorrectly

Incorporate patch provided in BZ

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2019-05-28 14:52:47 -06:00
commit 4d93de1927
2 changed files with 23 additions and 1 deletions

View file

@ -1,7 +1,7 @@
Summary: Command line ACPI client
Name: acpitool
Version: 0.5.1
Release: 20%{?dist}
Release: 21%{?dist}
License: GPLv2+
URL: https://sourceforge.net/projects/acpitool/
BuildRequires: gcc-c++
@ -14,6 +14,7 @@ Patch3: wakeup.patch
Patch4: var-line.patch
Patch5: typos.patch
Patch6: cleanup.patch
Patch7: cache-size.patch
%description
AcpiTool is a Linux ACPI client. It's a small command line application,
@ -33,6 +34,7 @@ toggle fan on/off, and more.
%patch4 -p1 -b .var-line
%patch5 -p1 -b .typos
%patch6 -p1 -b .cleanup
%patch7 -p1 -b .cache-size
%build
%configure
@ -48,6 +50,11 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_mandir}/man1/acpitool*
%changelog
* Tue May 28 2019 Al Stone <ahs3@redhat.com> - 0.5.1-21
- Cache size was being reported incorrectly (cpufreq was being used
instead). Pulled in patch submitted with bug report once verified.
Closes BZ#1701278.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

15
cache-size.patch Normal file
View file

@ -0,0 +1,15 @@
Actually print the cache size instead of cpufreq a second time.
Reported and fixed by Stephane Wirtel <stephane@wirtel.be>
diff -rNu acpitool-0.5.1/src/cpu.cpp acpitool-0.5.1-modified/src/cpu.cpp
--- acpitool-0.5.1/src/cpu.cpp 2009-08-13 21:26:02.000000000 +0200
+++ acpitool-0.5.1-modified/src/cpu.cpp 2019-04-18 16:01:54.091620544 +0200
@@ -80,6 +80,7 @@
}
fgets(str, 299, cpuinfo_fp);
+ fgets(str, 299, cpuinfo_fp);
memset(temp, '\0', 130);
sscanf(str, "%*[^:] %*s %s",temp);
printf(" Cache size : %s KB\n", temp);