diff options
author | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-07-20 13:08:06 -0700 |
---|---|---|
committer | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-07-20 13:08:06 -0700 |
commit | 1c7b4b999cb172b59833f829ab7b95fab11d7a00 (patch) | |
tree | c1b65656a7b719fa5257fdca9c24f0e3c5aeb63e | |
parent | 51242c5ac119768094209e3bf502beac34d1e3ff (diff) |
Removed boardname as the project is no longer supported, and the tool dosn't meet all needs as wanted.
-rw-r--r-- | src/main.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9f53b46..2c3639a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -235,26 +235,6 @@ void out_of_memory() abort(); } -static void load_board_params() -{ - string boardname; - char filename[4096]; - - boardname = read_sysfs_string("/etc/boardname"); - - if (boardname.length() < 2) - return; - - sprintf(filename, "/var/cache/powertop/saved_parameters.powertop.%s", boardname.c_str()); - - if (access(filename, R_OK)) - return; - - load_parameters(filename); - global_fixed_parameters = 1; - global_power_override = 1; -} - void report(int time, char *workload, int iterations, char *file) { @@ -301,6 +281,7 @@ static void powertop_init(void) static char initialized = 0; int ret; struct statfs st_fs; + char filename[4096]; if (initialized) return; @@ -345,7 +326,12 @@ static void powertop_init(void) register_parameter("disk-operations", 0.0); register_parameter("xwakes", 0.1); - load_board_params(); + if (access("/var/cache/powertop/saved_parameters.powertop", R_OK)){ + load_parameters("/var/cache/powertop/saved_parameters.powertop"); + global_fixed_parameters = 1; + global_power_override = 1; + } + initialized = 1; } |