aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-12 13:24:15 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2015-01-12 13:24:15 +0530
commite0d8920013a9c148a1be5a7b02c726945e4ad2b6 (patch)
tree23739b15c43bd2ad2064cf0603ef994638778b2c
parentd59e94616386498db69b3875ac46225f405fd62a (diff)
add cpu_should_not_have_cpufreq_directory()
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-xcpu.sh2
-rwxr-xr-xcpufreq.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/cpu.sh b/cpu.sh
index ad8ed48..a7c846f 100755
--- a/cpu.sh
+++ b/cpu.sh
@@ -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
diff --git a/cpufreq.sh b/cpufreq.sh
index f6d93f2..772326d 100755
--- a/cpufreq.sh
+++ b/cpufreq.sh
@@ -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