From patchwork Mon Jan 27 14:18:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 314392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0898B2C0092 for ; Tue, 28 Jan 2014 01:18:50 +1100 (EST) Received: from localhost ([::1]:59827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7n1R-0000t8-5c for incoming@patchwork.ozlabs.org; Mon, 27 Jan 2014 09:18:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7n13-0000Yz-H0 for qemu-devel@nongnu.org; Mon, 27 Jan 2014 09:18:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7n0v-0005HV-4U for qemu-devel@nongnu.org; Mon, 27 Jan 2014 09:18:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50777 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7n0u-0005Gr-UU; Mon, 27 Jan 2014 09:18:13 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 41E01AC5D; Mon, 27 Jan 2014 14:18:12 +0000 (UTC) From: Alexander Graf To: QEMU Developers Date: Mon, 27 Jan 2014 15:18:09 +0100 Message-Id: <1390832289-18701-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.135.220.15 Cc: gleb@kernel.org, Paolo Bonzini , Marcelo Tosatti , qemu-stable@nongnu.org, thomas knych Subject: [Qemu-devel] [PATCH] KVM: Use return value for error print X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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