Skip to contentSkip to conversation

kvm: Print something before calling abort() if KVM_RUN fails

PATCH Applied Michael Ellerman 2 participants 2 messages Dec 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: Print something before calling abort() if KVM_RUN fails

It's a little unfriendly to call abort() without printing any sort of error message. So turn the DPRINTK() into an fprintf(stderr, ...).

---
 kvm-all.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kvm-all.c +2 -1
index 4c466d6..ac048bc 100644
@@ -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();
         }
 
Signature · 1 line
1.7.7.3