diff options
Diffstat (limited to 'cpufreq.sh')
-rwxr-xr-x | cpufreq.sh | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -105,10 +105,15 @@ __update_cpufreq_files() if [ -f $filepath/$file ]; then # file is writable ? local wfile=$(ls -l $filepath/$file | awk '$1 ~ /^.*w.*/ { print $NF; }') + if [ ! -z $wfile ]; then - local val=$(cat $filepath/$file) - echo "Writing $val to: $file" - echo $val > $filepath/$file + # scaling_setspeed is a special file and so we + # should just skip it + if [ $file != "scaling_setspeed" ]; then + local val=$(cat $filepath/$file) + echo "Writing $val to: $file" + echo $val > $filepath/$file + fi fi else echo "" @@ -193,11 +198,12 @@ shuffle_frequency_for_all_cpus() } # clear dumps +# $1: file name clear_dumps() { - echo "" > $2.txt - echo "" > $2.cpufreq.txt - echo "" > $2.full.txt + echo "" > $1.txt + echo "" > $1.cpufreq.txt + echo "" > $1.full.txt } # $1: output file name |