From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X48C5-0003mZ-9t for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X48Bz-0000iU-Ga for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:38:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X48Bz-0000iQ-8a for qemu-devel@nongnu.org; Mon, 07 Jul 2014 08:38:47 -0400 Date: Mon, 7 Jul 2014 15:40:47 +0300 From: "Michael S. Tsirkin" Message-ID: <1404711994-18228-13-git-send-email-mst@redhat.com> References: <1404711994-18228-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1404711994-18228-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 12/12] qemu-char: add chr_add_watch support in mux chardev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , Anthony Liguori , Kirill Batuzov From: Kirill Batuzov Forward chr_add_watch call from mux chardev to underlying implementation. This should fix bug #1335444 Signed-off-by: Kirill Batuzov Acked-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- qemu-char.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index 22a9777..55e372c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -581,6 +581,12 @@ static Notifier muxes_realize_notify = { .notify = muxes_realize_done, }; +static GSource *mux_chr_add_watch(CharDriverState *s, GIOCondition cond) +{ + MuxDriver *d = s->opaque; + return d->drv->chr_add_watch(d->drv, cond); +} + static CharDriverState *qemu_chr_open_mux(CharDriverState *drv) { CharDriverState *chr; @@ -597,6 +603,9 @@ static CharDriverState *qemu_chr_open_mux(CharDriverState *drv) chr->chr_accept_input = mux_chr_accept_input; /* Frontend guest-open / -close notification is not support with muxes */ chr->chr_set_fe_open = NULL; + if (drv->chr_add_watch) { + chr->chr_add_watch = mux_chr_add_watch; + } /* only default to opened state if we've realized the initial * set of muxes */ -- MST