From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlTcq-0003Sv-4r for qemu-devel@nongnu.org; Wed, 09 Sep 2009 16:18:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlTck-0003SU-NA for qemu-devel@nongnu.org; Wed, 09 Sep 2009 16:18:42 -0400 Received: from [199.232.76.173] (port=38612 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlTck-0003SR-GU for qemu-devel@nongnu.org; Wed, 09 Sep 2009 16:18:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13466) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlTck-0005yO-1R for qemu-devel@nongnu.org; Wed, 09 Sep 2009 16:18:38 -0400 Message-ID: <4AA80D99.3060604@redhat.com> Date: Wed, 09 Sep 2009 22:18:33 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1252339585-27797-1-git-send-email-kraxel@redhat.com> <1252339585-27797-23-git-send-email-kraxel@redhat.com> <4AA8075E.2090102@web.de> In-Reply-To: <4AA8075E.2090102@web.de> Content-Type: multipart/mixed; boundary="------------020106090302060800080501" Subject: [Qemu-devel] Re: [PATCH 22/23] monitor: fix muxing List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020106090302060800080501 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 09/09/09 21:51, Jan Kiszka wrote: > Gerd Hoffmann wrote: >> make the mux driver send mux_in and mux_out events when switching >> focus while hooking up more handlers. >> >> stop using CharDriverState->focus in monitor.c, track state using >> the mux events instead. This also removes the implicit assumtion >> that a muxed monitor allways has mux channel 0. > > Nice patch in the right direction, but it comes with a regression: When > you enable the monitor on mux'ed stdio via CTRL-A C, you don't get a > prompt until pressing some key. Incremental fix attached. > Please add braces at this chance. Will do. cheers, Gerd --------------020106090302060800080501 Content-Type: text/plain; name="fix" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix" diff --git a/monitor.c b/monitor.c index edf48f3..476eab5 100644 --- a/monitor.c +++ b/monitor.c @@ -3113,6 +3113,7 @@ static void monitor_event(void *opaque, int event) switch (event) { case CHR_EVENT_MUX_IN: + mon->mux_out = 0; if (mon->reset_seen) { readline_restart(mon->rs); monitor_resume(mon); @@ -3120,7 +3121,6 @@ static void monitor_event(void *opaque, int event) } else { mon->suspend_cnt = 0; } - mon->mux_out = 0; break; case CHR_EVENT_MUX_OUT: --------------020106090302060800080501--