From f4155cc9e833105e05624c224d900ccbbbdb5c46 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Fri, 12 Aug 2016 12:27:04 +0900 Subject: [PATCH] mcstop+release-smp-x86.sh: fix OS instance discovery bug --- arch/x86/tools/mcstop+release-smp-x86.sh.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/tools/mcstop+release-smp-x86.sh.in b/arch/x86/tools/mcstop+release-smp-x86.sh.in index bf1b4962..e26c2e46 100644 --- a/arch/x86/tools/mcstop+release-smp-x86.sh.in +++ b/arch/x86/tools/mcstop+release-smp-x86.sh.in @@ -20,10 +20,12 @@ cpus="" if [ "`lsmod | grep ihk_smp_x86`" == "" ]; then exit; fi # Destroy all LWK instances +if ls /dev/mcos* 1>/dev/null 2>&1; then for i in /dev/mcos*; do ind=`echo $i|cut -c10-`; if ! ${SBINDIR}/ihkconfig 0 destroy $ind; then echo "error: destroying LWK instance $ind failed"; exit; fi done +fi # Query IHK-SMP resources and release them if ! ${SBINDIR}/ihkconfig 0 query cpu > /dev/null; then echo "error: querying cpus"; exit; fi