Fix the syntax to get the current cpu id number with the POSIX version.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- cpuhotplug/cpuhotplug_03.sh | 2 +- cpuhotplug/cpuhotplug_04.sh | 2 +- cpuhotplug/cpuhotplug_05.sh | 2 +- cpuhotplug/cpuhotplug_06.sh | 2 +- cpuhotplug/cpuhotplug_07.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cpuhotplug/cpuhotplug_03.sh b/cpuhotplug/cpuhotplug_03.sh index b506c0d..689fc8a 100755 --- a/cpuhotplug/cpuhotplug_03.sh +++ b/cpuhotplug/cpuhotplug_03.sh @@ -29,7 +29,7 @@
check_affinity_fails() { cpu=$1 - cpuid=${cpu:3} + cpuid=$(echo $cpu | awk '{print substr($0,4)}') dirpath=$CPU_PATH/$1
if [ "$cpu" = "cpu0" ]; then diff --git a/cpuhotplug/cpuhotplug_04.sh b/cpuhotplug/cpuhotplug_04.sh index 228703b..18a8e9c 100755 --- a/cpuhotplug/cpuhotplug_04.sh +++ b/cpuhotplug/cpuhotplug_04.sh @@ -30,7 +30,7 @@ CPUBURN=../utils/cpuburn
check_task_migrate() { cpu=$1 - cpuid=${cpu:3} + cpuid=$(echo $cpu | awk '{print substr($0,4)}') cpumask=$((1 << cpuid)) dirpath=$CPU_PATH/$1
diff --git a/cpuhotplug/cpuhotplug_05.sh b/cpuhotplug/cpuhotplug_05.sh index 7d755dd..960150a 100755 --- a/cpuhotplug/cpuhotplug_05.sh +++ b/cpuhotplug/cpuhotplug_05.sh @@ -29,7 +29,7 @@
check_procinfo() { cpu=$1 - cpuid=${cpu:3} + cpuid=$(echo $cpu | awk '{print substr($0,4)}')
if [ "$cpu" = "cpu0" ]; then is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0 diff --git a/cpuhotplug/cpuhotplug_06.sh b/cpuhotplug/cpuhotplug_06.sh index b0eae44..e1e59e3 100755 --- a/cpuhotplug/cpuhotplug_06.sh +++ b/cpuhotplug/cpuhotplug_06.sh @@ -29,7 +29,7 @@
check_procinfo() { cpu=$1 - cpuid=${cpu:3} + cpuid=$(echo $cpu | awk '{print substr($0,4)}')
if [ "$cpu" = "cpu0" ]; then is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0 diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh index 239855f..8ae9f72 100755 --- a/cpuhotplug/cpuhotplug_07.sh +++ b/cpuhotplug/cpuhotplug_07.sh @@ -30,7 +30,7 @@ TMPFILE=cpuhotplug_07.tmp
check_notification() { cpu=$1 - cpuid=${cpu:3} + cpuid=$(echo $cpu | awk '{print substr($0,4)}')
if [ "$cpu" = "cpu0" ]; then is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0