58bbd3c61c
- Update to new upstream release 2.0: * Interactive mode: redesigned, tab-based user interface with full on-demand window refresh support. * Reporting mode: PowerTOP v2.0 now allows you to specify not only the duration of each test measurement cycle, but the number of iterations to measure. PowerTOP can now produce HTML and CSV. * Increased WLAN support: PowerTOP now supports multiple WLAN interfaces * Enhanced i915 driver support * More robust battery data acquisition * Real time measurement support for USB hot-plug. OBS-URL: https://build.opensuse.org/request/show/120774 OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=11
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
---
|
|
src/parameters/persistent.cpp | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
Index: powertop-2.0/src/parameters/persistent.cpp
|
|
===================================================================
|
|
--- powertop-2.0.orig/src/parameters/persistent.cpp
|
|
+++ powertop-2.0/src/parameters/persistent.cpp
|
|
@@ -129,9 +129,6 @@ void save_parameters(const char *filenam
|
|
|
|
// printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
|
|
|
|
- if (!global_power_valid())
|
|
- return;
|
|
-
|
|
pathname = get_param_directory(filename);
|
|
|
|
file.open(pathname, ios::out);
|
|
@@ -140,12 +137,15 @@ void save_parameters(const char *filenam
|
|
return;
|
|
}
|
|
|
|
- map<string, int>::iterator it;
|
|
-
|
|
- for (it = param_index.begin(); it != param_index.end(); it++) {
|
|
- int index;
|
|
- index = it->second;
|
|
- file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
|
|
+ if (global_power_valid())
|
|
+ {
|
|
+ map<string, int>::iterator it;
|
|
+
|
|
+ for (it = param_index.begin(); it != param_index.end(); it++) {
|
|
+ int index;
|
|
+ index = it->second;
|
|
+ file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
|
|
+ }
|
|
}
|
|
file.close();
|
|
}
|