Blame SOURCES/powertop-2.7-always-create-params.patch
|
|
60eb6b |
diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp
|
|
|
60eb6b |
index 9a5688a..6a232cd 100644
|
|
|
60eb6b |
--- a/src/parameters/persistent.cpp
|
|
|
60eb6b |
+++ b/src/parameters/persistent.cpp
|
|
|
60eb6b |
@@ -145,9 +145,6 @@ void save_parameters(const char *filename)
|
|
|
60eb6b |
|
|
|
60eb6b |
// printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
|
|
|
60eb6b |
|
|
|
60eb6b |
- if (!global_power_valid())
|
|
|
60eb6b |
- return;
|
|
|
60eb6b |
-
|
|
|
60eb6b |
pathname = get_param_directory(filename);
|
|
|
60eb6b |
|
|
|
60eb6b |
file.open(pathname, ios::out);
|
|
|
60eb6b |
@@ -156,12 +153,15 @@ void save_parameters(const char *filename)
|
|
|
60eb6b |
return;
|
|
|
60eb6b |
}
|
|
|
60eb6b |
|
|
|
60eb6b |
- map<string, int>::iterator it;
|
|
|
60eb6b |
+ if (global_power_valid())
|
|
|
60eb6b |
+ {
|
|
|
60eb6b |
+ map<string, int>::iterator it;
|
|
|
60eb6b |
|
|
|
60eb6b |
- for (it = param_index.begin(); it != param_index.end(); it++) {
|
|
|
60eb6b |
- int index;
|
|
|
60eb6b |
- index = it->second;
|
|
|
60eb6b |
- file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
|
|
|
60eb6b |
+ for (it = param_index.begin(); it != param_index.end(); it++) {
|
|
|
60eb6b |
+ int index;
|
|
|
60eb6b |
+ index = it->second;
|
|
|
60eb6b |
+ file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n";
|
|
|
60eb6b |
+ }
|
|
|
60eb6b |
}
|
|
|
60eb6b |
file.close();
|
|
|
60eb6b |
}
|