Silence the grep results by using the -q option. The extra output that some grep commands print out would be more useful in debugging situations.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- cpuhotplug/cpuhotplug_06.sh | 2 +- cpuhotplug/cpuhotplug_07.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpuhotplug/cpuhotplug_06.sh b/cpuhotplug/cpuhotplug_06.sh index e1e59e3..3763274 100755 --- a/cpuhotplug/cpuhotplug_06.sh +++ b/cpuhotplug/cpuhotplug_06.sh @@ -37,7 +37,7 @@ check_procinfo() {
set_offline $cpu
- grep "CPU$cpuid" /proc/interrupts + grep -q "CPU$cpuid" /proc/interrupts ret=$?
check "offline processor not found in interrupts" "test $ret -ne 0" diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh index dbd7bff..af7acb5 100755 --- a/cpuhotplug/cpuhotplug_07.sh +++ b/cpuhotplug/cpuhotplug_07.sh @@ -52,11 +52,11 @@ check_notification() { sleep 1 kill -s INT $pid
- grep "offline@/devices/system/cpu/$cpu" $TMPFILE + grep -q "offline@/devices/system/cpu/$cpu" $TMPFILE ret=$? check "offline event was received" "test $ret -eq 0"
- grep "online@/devices/system/cpu/$cpu" $TMPFILE + grep -q "online@/devices/system/cpu/$cpu" $TMPFILE ret=$? check "online event was received" "test $ret -eq 0"