From patchwork Wed Sep 9 20:18:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 33227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id AA74EB6F31 for ; Thu, 10 Sep 2009 06:19:21 +1000 (EST) Received: from localhost ([127.0.0.1]:41355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlTdO-0003TC-65 for incoming@patchwork.ozlabs.org; Wed, 09 Sep 2009 16:19:18 -0400 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 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n89KIajC015834; Wed, 9 Sep 2009 16:18:37 -0400 Received: from zweiblum.home.kraxel.org (vpn1-5-3.ams2.redhat.com [10.36.5.3]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n89KIYDF023209; Wed, 9 Sep 2009 16:18:35 -0400 Message-ID: <4AA80D99.3060604@redhat.com> Date: Wed, 09 Sep 2009 22:18:33 +0200 From: Gerd Hoffmann User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 MIME-Version: 1.0 To: Jan Kiszka 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [PATCH 22/23] monitor: fix muxing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 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: