2012-05-14 11:40:37 +02:00
|
|
|
---
|
|
|
|
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
|
2012-02-06 15:55:14 +01:00
|
|
|
|
|
|
|
// printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
|
|
|
|
|
|
|
|
- if (!global_power_valid())
|
|
|
|
- return;
|
2012-05-14 11:40:37 +02:00
|
|
|
-
|
|
|
|
pathname = get_param_directory(filename);
|
2012-02-06 15:55:14 +01:00
|
|
|
|
2012-05-14 11:40:37 +02:00
|
|
|
file.open(pathname, ios::out);
|
|
|
|
@@ -140,12 +137,15 @@ void save_parameters(const char *filenam
|
2012-02-06 15:55:14 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-05-14 11:40:37 +02:00
|
|
|
- map<string, int>::iterator it;
|
|
|
|
-
|
2012-02-06 15:55:14 +01:00
|
|
|
- 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";
|
2012-05-14 11:40:37 +02:00
|
|
|
+ }
|
|
|
|
}
|
2012-02-06 15:55:14 +01:00
|
|
|
file.close();
|
|
|
|
}
|