From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIG85-0006Vd-0v for qemu-devel@nongnu.org; Tue, 25 Feb 2014 06:24:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIG80-0000oy-I0 for qemu-devel@nongnu.org; Tue, 25 Feb 2014 06:24:52 -0500 From: Paolo Bonzini Date: Tue, 25 Feb 2014 11:44:56 +0100 Message-Id: <1393325096-8338-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1393325096-8338-1-git-send-email-pbonzini@redhat.com> References: <1393325096-8338-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 1/1] KVM: Use return value for error print List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Alexander Graf , qemu-stable@nongnu.org From: Alexander Graf 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. Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf Signed-off-by: Paolo Bonzini --- kvm-all.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index f742f8d..979a8d9 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.7.1