From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTQp-0005G8-Sp for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:25:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afTQl-0007Lm-Sq for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:25:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTQl-0007Lc-NL for qemu-devel@nongnu.org; Mon, 14 Mar 2016 10:25:11 -0400 References: <1457954501-26528-1-git-send-email-den@openvz.org> <1457954501-26528-2-git-send-email-den@openvz.org> From: Paolo Bonzini Message-ID: <56E6C9C4.4030706@redhat.com> Date: Mon, 14 Mar 2016 15:25:08 +0100 MIME-Version: 1.0 In-Reply-To: <1457954501-26528-2-git-send-email-den@openvz.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/9] trace: do not always call exit() in trace_enable_events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On 14/03/2016 12:21, Denis V. Lunev wrote: > 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 > CC: Stefan Hajnoczi > CC: Paolo Bonzini > --- > trace/control.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/trace/control.c b/trace/control.c > index 20d3370..2d404c3 100644 > --- a/trace/control.c > +++ b/trace/control.c > @@ -19,6 +19,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]; > @@ -131,7 +132,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); > } > Ouch. :) Reviewed-by: Paolo Bonzini Paolo