aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-01-27 00:49:13 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-02 11:33:53 +0400
commit1ce2610c106d925387669b3133fc18ea986f0476 (patch)
treebd08c41941ea2235cabde4c02739f6ca52ff07d7 /hw/char
parenta9b1ca38c2b1f062f22d4847e3b4c848d0fb84c3 (diff)
downloadqemu-1ce2610c106d925387669b3133fc18ea986f0476.zip
qemu-1ce2610c106d925387669b3133fc18ea986f0476.tar.gz
qemu-1ce2610c106d925387669b3133fc18ea986f0476.tar.bz2
char: make chr_fe_deinit() optionaly delete backend
This simplifies removing a backend for a frontend user (no need to retrieve the associated driver and separate delete call etc). NB: many frontends have questionable handling of ending a chardev. They should probably delete the backend to prevent broken reusage. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/serial.c2
-rw-r--r--hw/char/xen_console.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 23e5fe9..e1f1250 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -905,7 +905,7 @@ void serial_realize_core(SerialState *s, Error **errp)
void serial_exit_core(SerialState *s)
{
- qemu_chr_fe_deinit(&s->chr);
+ qemu_chr_fe_deinit(&s->chr, false);
timer_del(s->modem_status_poll);
timer_free(s->modem_status_poll);
diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c
index cb849c2..f9af8ca 100644
--- a/hw/char/xen_console.c
+++ b/hw/char/xen_console.c
@@ -261,7 +261,7 @@ static void con_disconnect(struct XenDevice *xendev)
{
struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
- qemu_chr_fe_deinit(&con->chr);
+ qemu_chr_fe_deinit(&con->chr, false);
xen_pv_unbind_evtchn(&con->xendev);
if (con->sring) {