qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/5] runstate: Print state transition when invalid


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 2/5] runstate: Print state transition when invalid
Date: Fri, 14 Oct 2011 14:26:40 -0300

Makes it easier to debug.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 vl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index dbf7778..6645720 100644
--- a/vl.c
+++ b/vl.c
@@ -397,7 +397,9 @@ void runstate_set(RunState new_state)
 {
     if (new_state >= RUN_STATE_MAX ||
         !runstate_valid_transitions[current_run_state][new_state]) {
-        fprintf(stderr, "invalid runstate transition\n");
+        fprintf(stderr, "ERROR: invalid runstate transition: '%s' -> '%s'\n",
+                RunState_lookup[current_run_state],
+                RunState_lookup[new_state]);
         abort();
     }
 
-- 
1.7.7.rc3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]