New version
- Dropped html-escape patch (not needed)
This commit is contained in:
parent
4c2c8f7420
commit
18b83e55bf
@ -1,33 +0,0 @@
|
||||
diff -up powertop-2.0/src/tuning/tuning.cpp.orig powertop-2.0/src/tuning/tuning.cpp
|
||||
--- powertop-2.0/src/tuning/tuning.cpp.orig 2012-05-09 18:43:29.000000000 +0200
|
||||
+++ powertop-2.0/src/tuning/tuning.cpp 2012-05-16 19:28:25.398232302 +0200
|
||||
@@ -217,6 +217,20 @@ static const char *tune_class_bad(int li
|
||||
return "tunable_even_bad";
|
||||
}
|
||||
|
||||
+static std::string html_encode(std::string data) {
|
||||
+ std::string buffer;
|
||||
+ buffer.reserve(data.size());
|
||||
+ for (size_t pos = 0; pos != data.size(); pos++) {
|
||||
+ switch(data[pos]) {
|
||||
+ case '&': buffer.append("&"); break;
|
||||
+ case '\"': buffer.append("""); break;
|
||||
+ case '<': buffer.append("<"); break;
|
||||
+ case '>': buffer.append(">"); break;
|
||||
+ default: buffer.append(1, data[pos]); break;
|
||||
+ }
|
||||
+ }
|
||||
+ return buffer;
|
||||
+}
|
||||
|
||||
void report_show_tunables(void)
|
||||
{
|
||||
@@ -254,7 +268,7 @@ void report_show_tunables(void)
|
||||
fprintf(reportout.csv_report, "Description, \n");
|
||||
|
||||
if (reporttype)
|
||||
- fprintf(reportout.http_report, "<tr class=\"%s\"><td>%s</td><td>%s</td></tr>\n", tune_class_bad(line), all_tunables[i]->description(), all_tunables[i]->toggle_script());
|
||||
+ fprintf(reportout.http_report, "<tr class=\"%s\"><td>%s</td><td>%s</td></tr>\n", tune_class_bad(line), all_tunables[i]->description(), html_encode(std::string(all_tunables[i]->toggle_script())).c_str());
|
||||
else
|
||||
fprintf(reportout.csv_report, "\"%s\", \n", all_tunables[i]->description());
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
Name: powertop
|
||||
Version: 2.1
|
||||
Release: 2%{?dist}
|
||||
Version: 2.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
@ -10,7 +10,6 @@ Source0: http://01.org/powertop/sites/default/files/downloads/%{name}-%{ve
|
||||
|
||||
# Sent upstream
|
||||
Patch0: powertop-2.0-always-create-params.patch
|
||||
Patch1: powertop-2.0-html-escape.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
|
||||
|
||||
@ -21,7 +20,6 @@ computer use more power than necessary while it is idle.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .always-create-params
|
||||
%patch1 -p1 -b .html-escape
|
||||
|
||||
# remove left over object files
|
||||
find . -name "*.o" -exec rm {} \;
|
||||
@ -54,6 +52,10 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man8/powertop.8*
|
||||
|
||||
%changelog
|
||||
* Fri Nov 23 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.2-1
|
||||
- New version
|
||||
- Dropped html-escape patch (not needed)
|
||||
|
||||
* Thu Aug 16 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-2
|
||||
- Removed left over object files
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user