summaryrefslogtreecommitdiff
path: root/spice-qemu-char.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-22 13:09:43 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-24 15:46:11 +0200
commit82878dac6fcd16cb4fa47266bcd3dd03df436dae (patch)
tree7f16567124bb2ae28efea46144f648a2895a4e92 /spice-qemu-char.c
parentebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (diff)
downloadqemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.tar.gz
char: remove explicit_be_open from CharDriverState
It's only used in qmp_chardev_add(), so use a create() argument instead. Also switched to typedef functions for CharDriverParse/CharDriverCreate. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022100951.19562-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'spice-qemu-char.c')
-rw-r--r--spice-qemu-char.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 89fae6dc3f..276c4aef68 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -282,7 +282,6 @@ static CharDriverState *chr_open(const char *subtype,
chr->chr_add_watch = spice_chr_add_watch;
chr->chr_free = spice_chr_free;
chr->chr_set_fe_open = set_fe_open;
- chr->explicit_be_open = true;
chr->chr_accept_input = spice_chr_accept_input;
QLIST_INSERT_HEAD(&spice_chars, s, next);
@@ -293,6 +292,7 @@ static CharDriverState *chr_open(const char *subtype,
static CharDriverState *qemu_chr_open_spice_vmc(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
+ bool *be_opened,
Error **errp)
{
ChardevSpiceChannel *spicevmc = backend->u.spicevmc.data;
@@ -311,6 +311,7 @@ static CharDriverState *qemu_chr_open_spice_vmc(const char *id,
return NULL;
}
+ *be_opened = false;
return chr_open(type, spice_vmc_set_fe_open, common, errp);
}
@@ -318,6 +319,7 @@ static CharDriverState *qemu_chr_open_spice_vmc(const char *id,
static CharDriverState *qemu_chr_open_spice_port(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
+ bool *be_opened,
Error **errp)
{
ChardevSpicePort *spiceport = backend->u.spiceport.data;
@@ -335,6 +337,7 @@ static CharDriverState *qemu_chr_open_spice_port(const char *id,
if (!chr) {
return NULL;
}
+ *be_opened = false;
s = chr->opaque;
s->sin.portname = g_strdup(name);