qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] kvm: Print something before calling abort() if KVM_RUN fails
@ 2011-12-16  0:20 Michael Ellerman
  2011-12-16 10:46 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2011-12-16  0:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: 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 <michael@ellerman.id.au>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] kvm: Print something before calling abort() if KVM_RUN fails
  2011-12-16  0:20 [Qemu-devel] [PATCH] kvm: Print something before calling abort() if KVM_RUN fails Michael Ellerman
@ 2011-12-16 10:46 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-12-16 10:46 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: qemu-devel

On Fri, Dec 16, 2011 at 11:20:20AM +1100, Michael Ellerman wrote:
> 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 <michael@ellerman.id.au>
> ---
>  kvm-all.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-16 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16  0:20 [Qemu-devel] [PATCH] kvm: Print something before calling abort() if KVM_RUN fails Michael Ellerman
2011-12-16 10:46 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).