From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] x86-run: Print a meaningful message if the qemu binary isn't found Date: Thu, 09 Apr 2015 18:44:14 +0200 Message-ID: <5526AC5E.7050803@redhat.com> References: <551D3A47.1030404@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti To: Bandan Das , kvm@vger.kernel.org Return-path: Received: from mail-wi0-f176.google.com ([209.85.212.176]:33867 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753196AbbDIQoj (ORCPT ); Thu, 9 Apr 2015 12:44:39 -0400 Received: by widjs5 with SMTP id js5so59295057wid.1 for ; Thu, 09 Apr 2015 09:44:38 -0700 (PDT) In-Reply-To: <551D3A47.1030404@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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= environment variable >> >> Signed-off-by: Bandan Das 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= 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= 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