Re: [PATCH] x86-run: Print a meaningful message if the qemu binary isn't found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/04/2015 14:47, Paolo Bonzini wrote:
> On 01/04/2015 23:12, Bandan Das wrote:
>>
>> Before:
>> ./x86-run ./x86/msr.flat
>> QEMU binary has no support for test device. Exiting.
>>
>> After:
>> ./x86-run ./x86/msr.flat
>> A QEMU binary was not found, You can set a custom
>> location by using the QEMU=<path> environment variable
>>
>> Signed-off-by: Bandan Das <bsd@xxxxxxxxxx>

This breaks "QEMU=... ./x86-run ./x86/msr.flat"

Fixed as follows:

diff --git a/x86/run b/x86/run
index d5adf8d..219a93b 100755
--- a/x86/run
+++ b/x86/run
@@ -20,16 +20,15 @@ else
 		    break
 		fi
 	done
-fi
-
-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 ${NOTFOUND}
-elif    [ -z "${qemu}" ]
-then
-	echo "No Qemu test device support found"
-	exit ${TESTDEVNOTSUPP}
+	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 ${NOTFOUND}
+	elif    [ -z "${qemu}" ]
+	then
+		echo "No Qemu test device support found"
+		exit ${TESTDEVNOTSUPP}
+	fi
 fi
 
 if

which apart from reindentation is just moving a "fi" down.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux