arm/run: use search_qemu_binary function for arm
Changes required for arm/run to use the search_qemu_binary function
for seaching the qemu
Signed-off-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
Message-Id: <1492755305-8880-1-git-send-email-bala24@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/arm/run b/arm/run
index 2134c9e..bae43fd 100755
--- a/arm/run
+++ b/arm/run
@@ -31,16 +31,10 @@
fi
fi
-qemu="${QEMU:-qemu-system-$ARCH_NAME}"
-qpath=$(which $qemu 2>/dev/null)
-
-if [ -z "$qpath" ]; then
- echo $qemu not found.
- exit 2
-fi
+qemu=$(search_qemu_binary)
if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
- echo "$qpath doesn't support mach-virt ('-machine virt'). Exiting."
+ echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
exit 2
fi
@@ -59,13 +53,13 @@
fi
if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then
- echo "$qpath doesn't support virtio-console for chr-testdev. Exiting."
+ echo "$qemu doesn't support virtio-console for chr-testdev. Exiting."
exit 2
fi
if $qemu $M -chardev testdev,id=id -initrd . 2>&1 \
| grep backend > /dev/null; then
- echo "$qpath doesn't support chr-testdev. Exiting."
+ echo "$qemu doesn't support chr-testdev. Exiting."
exit 2
fi