diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-02-13 14:18:13 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-02-13 14:23:39 +0100 |
commit | 4ad6f6cb149b03ab9399a63208918cde09248294 (patch) | |
tree | 7bb7be7dc3fbdd36e7f93e8d9f3ed4858a71eda3 /hw/char | |
parent | 211ef6c4b6297a6275015c16b76bc72de35c56c3 (diff) | |
download | qemu-4ad6f6cb149b03ab9399a63208918cde09248294.zip qemu-4ad6f6cb149b03ab9399a63208918cde09248294.tar.gz qemu-4ad6f6cb149b03ab9399a63208918cde09248294.tar.bz2 |
char: allow specifying a GMainContext at opening time
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 <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190202110834.24880-1-pbonzini@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/char')
-rw-r--r-- | hw/char/omap_uart.c | 4 | ||||
-rw-r--r-- | hw/char/xen_console.c | 3 |
2 files changed, 4 insertions, 3 deletions
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, |