From 39ab61c6d0757ed95badc9315857effdb64e4aa0 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Sat, 22 Oct 2016 12:53:03 +0300 Subject: char: remove explicit_fe_open, use a set_handlers argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No need to keep explicit_fe_open around if it affects only a qemu_chr_fe_set_handlers(). Use an additional argument instead. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-24-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-char.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'qemu-char.c') diff --git a/qemu-char.c b/qemu-char.c index af060ceb64..a1517a4e4c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -832,7 +832,7 @@ static void mux_chr_set_handlers(CharDriverState *chr, GMainContext *context) mux_chr_read, mux_chr_event, chr, - context); + context, true); } static void mux_set_focus(MuxDriver *d, int focus) @@ -931,7 +931,7 @@ void qemu_chr_fe_deinit(CharBackend *b) assert(b); if (b->chr) { - qemu_chr_fe_set_handlers(b, NULL, NULL, NULL, NULL, NULL); + qemu_chr_fe_set_handlers(b, NULL, NULL, NULL, NULL, NULL, true); b->chr->avail_connections++; b->chr->be = NULL; if (b->chr->is_mux) { @@ -947,7 +947,8 @@ void qemu_chr_fe_set_handlers(CharBackend *b, IOReadHandler *fd_read, IOEventHandler *fd_event, void *opaque, - GMainContext *context) + GMainContext *context, + bool set_open) { CharDriverState *s; int fe_open; @@ -971,7 +972,7 @@ void qemu_chr_fe_set_handlers(CharBackend *b, s->chr_update_read_handler(s, context); } - if (!s->explicit_fe_open) { + if (set_open) { qemu_chr_fe_set_open(b, fe_open); } -- cgit v1.2.3-70-g09d2