[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/4] trace: do not always call exit() in trace_enable
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 2/4] trace: do not always call exit() in trace_enable_events |
Date: |
Thu, 31 Mar 2016 13:35:36 +0100 |
From: "Denis V. Lunev" <address@hidden>
The problem is that
virsh qemu-monitor-command --hmp VM log trace:help
forces QEMU to exit even when running VM normally.
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
CC: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
trace/control.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/trace/control.c b/trace/control.c
index ccddda5..d099f73 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -20,6 +20,7 @@
#include "qemu/log.h"
#endif
#include "qemu/error-report.h"
+#include "monitor/monitor.h"
int trace_events_enabled_count;
bool trace_events_dstate[TRACE_EVENT_COUNT];
@@ -132,7 +133,9 @@ void trace_enable_events(const char *line_buf)
{
if (is_help_option(line_buf)) {
trace_list_events();
- exit(0);
+ if (cur_mon == NULL) {
+ exit(0);
+ }
} else {
do_trace_enable_events(line_buf);
}
--
2.5.5