diff options
author | Denis V. Lunev <den@openvz.org> | 2016-03-16 14:36:51 +0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-03-31 09:48:59 +0100 |
commit | acc6809ddc45dd9a896c53ec7b61e66604923cd7 (patch) | |
tree | 71c05a099c728bbf38bfd7b7f457c747ac078663 /trace | |
parent | ab8eb29c4a221fe365e3d1b4744c6992ba5f11bd (diff) |
trace: do not always call exit() in trace_enable_events
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 <den@openvz.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1458128212-4197-2-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r-- | trace/control.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/trace/control.c b/trace/control.c index ccddda537f..d099f735d5 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); } |