aboutsummaryrefslogtreecommitdiff
path: root/backends
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 /backends
parentebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (diff)
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 'backends')
-rw-r--r--backends/baum.c1
-rw-r--r--backends/msmouse.c3
-rw-r--r--backends/testdev.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/backends/baum.c b/backends/baum.c
index a51643496e..919844e7f0 100644
--- a/backends/baum.c
+++ b/backends/baum.c
@@ -566,6 +566,7 @@ static void baum_free(struct CharDriverState *chr)
static CharDriverState *chr_baum_init(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
+ bool *be_opened,
Error **errp)
{
ChardevCommon *common = backend->u.braille.data;
diff --git a/backends/msmouse.c b/backends/msmouse.c
index 448369fd1c..733ca80f48 100644
--- a/backends/msmouse.c
+++ b/backends/msmouse.c
@@ -151,6 +151,7 @@ static QemuInputHandler msmouse_handler = {
static CharDriverState *qemu_chr_open_msmouse(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
+ bool *be_opened,
Error **errp)
{
ChardevCommon *common = backend->u.msmouse.data;
@@ -164,7 +165,7 @@ static CharDriverState *qemu_chr_open_msmouse(const char *id,
chr->chr_write = msmouse_chr_write;
chr->chr_free = msmouse_chr_free;
chr->chr_accept_input = msmouse_chr_accept_input;
- chr->explicit_be_open = true;
+ *be_opened = false;
mouse = g_new0(MouseState, 1);
mouse->hs = qemu_input_handler_register((DeviceState *)mouse,
diff --git a/backends/testdev.c b/backends/testdev.c
index 1ba8bf25a1..60156e320e 100644
--- a/backends/testdev.c
+++ b/backends/testdev.c
@@ -112,6 +112,7 @@ static void testdev_free(struct CharDriverState *chr)
static CharDriverState *chr_testdev_init(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
+ bool *be_opened,
Error **errp)
{
TestdevCharState *testdev;