Skip to contentSkip to conversation

x86/run: use qemu_binary to search qemu for x86

PATCH New Balamuruhan S 1 participant 1 message Apr 21, 2017 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 x86/run: use qemu_binary to search qemu for x86

Changes required for x86/run to use the qemu_binary function for seaching the qemu

---
 x86/run | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)
x86/run +5 -20
index 867a1cc..eebfef9 100755
@@ -2,28 +2,13 @@
 
 [ -z "$STANDALONE" ] && source scripts/arch-run.bash
 
-qemubinarysearch="${QEMU:-qemu-kvm qemu-system-x86_64}"
+# qemu_binary () defined in scripts/arch-run.bash
+qemu_binary
 
-for qemucmd in ${qemubinarysearch}
-do
-	unset QEMUFOUND
-	unset qemu
-	if ! [ -z "${QEMUFOUND=$(${qemucmd} --help 2>/dev/null | grep "QEMU")}" ] &&
-			${qemucmd} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
-	then
-		qemu="${qemucmd}"
-		break
-	fi
-done
-
-if      [ -z "${QEMUFOUND}" ]
-then
-	echo "A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable "
-	exit 2
-elif    [ -z "${qemu}" ]
+if ! ${qemu} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
 then
-	echo "No Qemu test device support found"
-	exit 2
+    echo "No Qemu test device support found"
+    exit 2
 fi
 
 if
Signature · 1 line
2.7.4