From patchwork Fri Dec 16 00:20:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 131766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A78C51007D7 for ; Fri, 16 Dec 2011 11:20:40 +1100 (EST) Received: from localhost ([::1]:53014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbLXR-0005Pj-LQ for incoming@patchwork.ozlabs.org; Thu, 15 Dec 2011 19:20:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbLXL-0005PT-QB for qemu-devel@nongnu.org; Thu, 15 Dec 2011 19:20:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbLXK-0006FU-OG for qemu-devel@nongnu.org; Thu, 15 Dec 2011 19:20:31 -0500 Received: from ozlabs.org ([203.10.76.45]:50982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbLXK-0006FC-Ed for qemu-devel@nongnu.org; Thu, 15 Dec 2011 19:20:30 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 5A5161007D5; Fri, 16 Dec 2011 11:20:26 +1100 (EST) From: Michael Ellerman To: qemu-devel@nongnu.org Date: Fri, 16 Dec 2011 11:20:20 +1100 Message-Id: <1323994820-22750-1-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.7.7.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.10.76.45 Cc: Michael Ellerman Subject: [Qemu-devel] [PATCH] kvm: Print something before calling abort() if KVM_RUN fails 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 It's a little unfriendly to call abort() without printing any sort of error message. So turn the DPRINTK() into an fprintf(stderr, ...). Signed-off-by: Michael Ellerman --- kvm-all.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 4c466d6..ac048bc 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -977,7 +977,8 @@ int kvm_cpu_exec(CPUState *env) ret = EXCP_INTERRUPT; break; } - DPRINTF("kvm run failed %s\n", strerror(-run_ret)); + fprintf(stderr, "error: kvm run failed %s\n", + strerror(-run_ret)); abort(); }