diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-12 13:24:15 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-12 13:24:15 +0530 |
commit | e0d8920013a9c148a1be5a7b02c726945e4ad2b6 (patch) | |
tree | 23739b15c43bd2ad2064cf0603ef994638778b2c | |
parent | d59e94616386498db69b3875ac46225f405fd62a (diff) |
add cpu_should_not_have_cpufreq_directory()
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | cpu.sh | 2 | ||||
-rwxr-xr-x | cpufreq.sh | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -73,7 +73,7 @@ for_each_non_boot_cpu() { # Prints warning for all CPUs with missing cpufreq directory print_unmanaged_cpus() { - for_each_cpu cpu_has_cpufreq_directory + for_each_cpu cpu_should_have_cpufreq_directory } # Counts CPUs with cpufreq directories @@ -16,13 +16,20 @@ GLOBAL_CPUFREQ="/sys/devices/system/cpu/cpufreq" # GENERIC HELPERS # $1: cpu -cpu_has_cpufreq_directory() +cpu_should_have_cpufreq_directory() { if [ ! -d /sys/devices/system/cpu/$1/cpufreq ]; then echo "Warning: No cpufreq directory present for $1" fi } +cpu_should_not_have_cpufreq_directory() +{ + if [ -d /sys/devices/system/cpu/$1/cpufreq ]; then + echo "Warning: cpufreq directory present for $1" + fi +} + # READ CPUFREQ FILES |