diff options
-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 |