From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzl6c-0003K4-CA for qemu-devel@nongnu.org; Thu, 27 Oct 2016 09:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzl6W-0000r4-Ce for qemu-devel@nongnu.org; Thu, 27 Oct 2016 09:52:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42608) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzl6W-0000qX-7N for qemu-devel@nongnu.org; Thu, 27 Oct 2016 09:52:24 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E92C61B97 for ; Thu, 27 Oct 2016 13:52:23 +0000 (UTC) Date: Thu, 27 Oct 2016 14:52:20 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20161027135219.GE2033@work-vm> References: <1477575523-3105-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477575523-3105-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-char: do not forward events through the mux until QEMU has started List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, marcandre.lureau@redhat.com * Paolo Bonzini (pbonzini@redhat.com) wrote: > Otherwise, the CHR_EVENT_OPENED event is sent twice: first when the > backend (for example "stdio") is opened, and second after processing > the command line. > > The incorrect sending of the event prints the monitor banner when > QEMU is started with "-serial mon:stdio". This includes the "(qemu)" > prompt; thus the monitor seems to be dead, whereas actually the > active front-end is the serial port. > > Reported-by: Dr. David Alan Gilbert > Signed-off-by: Paolo Bonzini ok, that seems to fix the monitor; it doesn't fix slirp. Tested--by: Dr. David Alan Gilbert Dave > --- > qemu-char.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 6dd779f..2e02d95 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -735,19 +735,23 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size) > } > } > > +static bool muxes_realized; > + > static void mux_chr_event(void *opaque, int event) > { > CharDriverState *chr = opaque; > MuxDriver *d = chr->opaque; > int i; > > + if (!muxes_realized) { > + return; > + } > + > /* Send the event to all registered listeners */ > for (i = 0; i < d->mux_cnt; i++) > mux_chr_send_event(d, i, event); > } > > -static bool muxes_realized; > - > /** > * Called after processing of default and command-line-specified > * chardevs to deliver CHR_EVENT_OPENED events to any FEs attached > -- > 2.7.4 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK