From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbAQ-0000jt-9x for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:14:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcbAK-0002NY-Je for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:14:02 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:50466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcbAK-0002NA-Ar for qemu-devel@nongnu.org; Mon, 19 Dec 2011 06:13:56 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Dec 2011 11:13:55 -0000 Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBJBDqjd2236480 for ; Mon, 19 Dec 2011 11:13:52 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost.localdomain [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBJBDqpU005598 for ; Mon, 19 Dec 2011 04:13:52 -0700 From: Stefan Hajnoczi Date: Mon, 19 Dec 2011 11:12:25 +0000 Message-Id: <1324293158-25433-5-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1324293158-25433-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 04/17] kvm: Print something before calling abort() if KVM_RUN fails List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Ellerman , Anthony Liguori , Stefan Hajnoczi From: Michael Ellerman 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 Signed-off-by: Stefan Hajnoczi --- 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(); } -- 1.7.7.3