From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGjgI-00060E-Sz for qemu-devel@nongnu.org; Fri, 21 Feb 2014 01:34:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGjgC-0002YK-TR for qemu-devel@nongnu.org; Fri, 21 Feb 2014 01:33:54 -0500 Sender: Paolo Bonzini Message-ID: <5306F347.6020806@redhat.com> Date: Fri, 21 Feb 2014 07:33:43 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1390832289-18701-1-git-send-email-agraf@suse.de> In-Reply-To: <1390832289-18701-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] KVM: Use return value for error print List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , QEMU Developers Cc: gleb@kernel.org, thomas knych , Marcelo Tosatti , qemu-stable@nongnu.org Il 27/01/2014 15:18, Alexander Graf ha scritto: > Commit 94ccff13 introduced a more verbose failure message and retry > operations on KVM VM creation. However, it ended up using a variable > for its failure message that hasn't been initialized yet. > > Fix it to use the value it meant to set. > > Signed-off-by: Alexander Graf > --- > kvm-all.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kvm-all.c b/kvm-all.c > index a3fb8de..3f78651 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1427,7 +1427,7 @@ int kvm_init(void) > } while (ret == -EINTR); > > if (ret < 0) { > - fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -s->vmfd, > + fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -ret, > strerror(-ret)); > > #ifdef TARGET_S390X > Applied to uq/master, thanks. Paolo