From 4ad6f6cb149b03ab9399a63208918cde09248294 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 13 Feb 2019 14:18:13 +0100 Subject: char: allow specifying a GMainContext at opening time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the initial connection will happen on the default GMainContext, and no one will be listening on it. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Message-Id: <20190202110834.24880-1-pbonzini@redhat.com> Signed-off-by: Marc-André Lureau --- hw/char/omap_uart.c | 4 ++-- hw/char/xen_console.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/char') diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 6fd1b9c..b3bb1cf 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -63,7 +63,7 @@ struct omap_uart_s *omap_uart_init(hwaddr base, s->irq = irq; s->serial = serial_mm_init(get_system_memory(), base, 2, irq, omap_clk_getrate(fclk)/16, - chr ?: qemu_chr_new(label, "null"), + chr ?: qemu_chr_new(label, "null", NULL), DEVICE_NATIVE_ENDIAN); return s; } @@ -183,6 +183,6 @@ void omap_uart_attach(struct omap_uart_s *s, Chardev *chr) /* TODO: Should reuse or destroy current s->serial */ s->serial = serial_mm_init(get_system_memory(), s->base, 2, s->irq, omap_clk_getrate(s->fclk) / 16, - chr ?: qemu_chr_new("null", "null"), + chr ?: qemu_chr_new("null", "null", NULL), DEVICE_NATIVE_ENDIAN); } diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index dc6ff0e..91f34ef 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -211,7 +211,8 @@ static int con_init(struct XenLegacyDevice *xendev) * FIXME: sure we want to support implicit * muxed monitors here? */ - qemu_chr_new_mux_mon(label, output), &error_abort); + qemu_chr_new_mux_mon(label, output, NULL), + &error_abort); } xenstore_store_pv_console_info(con->xendev.dev, -- cgit v1.1