From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7vT9-0008Q7-9Q for qemu-devel@nongnu.org; Mon, 27 Jan 2014 18:19:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7vT8-0002Yl-F5 for qemu-devel@nongnu.org; Mon, 27 Jan 2014 18:19:55 -0500 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:44941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7vT8-0002Yh-9r for qemu-devel@nongnu.org; Mon, 27 Jan 2014 18:19:54 -0500 Received: by mail-qc0-f176.google.com with SMTP id e16so9041621qcx.21 for ; Mon, 27 Jan 2014 15:19:53 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1390832289-18701-1-git-send-email-agraf@suse.de> References: <1390832289-18701-1-git-send-email-agraf@suse.de> From: Tom Knych Date: Mon, 27 Jan 2014 15:12:30 -0800 Message-ID: Content-Type: multipart/alternative; boundary=001a11c16dfcb81df204f0fbd86c 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 Cc: gleb@kernel.org, Paolo Bonzini , Marcelo Tosatti , QEMU Developers , qemu-stable@nongnu.org --001a11c16dfcb81df204f0fbd86c Content-Type: text/plain; charset=UTF-8 +1 On Mon, Jan 27, 2014 at 6:18 AM, Alexander Graf wrote: > 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 > -- > 1.8.1.4 > > --001a11c16dfcb81df204f0fbd86c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
+1=C2=A0


On Mon, Jan 27, 2014 at 6:18 AM, Alexander Graf <agraf@suse.= de> wrote:
Commit 94ccff13 introduced a more verbose fa= ilure 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 <agraf@su= se.de>
---
=C2=A0kvm-all.c | 2 +-
=C2=A01 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)
=C2=A0 =C2=A0 =C2=A0} while (ret =3D=3D -EINTR);

=C2=A0 =C2=A0 =C2=A0if (ret < 0) {
- =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "ioctl(KVM_CREATE_VM) fai= led: %d %s\n", -s->vmfd,
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "ioctl(KVM_CREATE_VM) fai= led: %d %s\n", -ret,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0strerror(-ret= ));

=C2=A0#ifdef TARGET_S390X
--
1.8.1.4


--001a11c16dfcb81df204f0fbd86c--