aboutsummaryrefslogtreecommitdiff
path: root/ui/console.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 /ui/console.c
parentebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (diff)
downloadqemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.zip
qemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.tar.gz
qemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.tar.bz2
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 'ui/console.c')
-rw-r--r--ui/console.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/console.c b/ui/console.c
index f490346..ed888e5 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2079,10 +2079,6 @@ static CharDriverState *text_console_init(ChardevVC *vc, Error **errp)
s->chr = chr;
chr->opaque = s;
chr->chr_set_echo = text_console_set_echo;
- /* console/chardev init sometimes completes elsewhere in a 2nd
- * stage, so defer OPENED events until they are fully initialized
- */
- chr->explicit_be_open = true;
if (display_state) {
text_console_do_init(chr, display_state);
@@ -2093,8 +2089,13 @@ static CharDriverState *text_console_init(ChardevVC *vc, Error **errp)
static VcHandler *vc_handler = text_console_init;
static CharDriverState *vc_init(const char *id, ChardevBackend *backend,
- ChardevReturn *ret, Error **errp)
+ ChardevReturn *ret, bool *be_opened,
+ Error **errp)
{
+ /* console/chardev init sometimes completes elsewhere in a 2nd
+ * stage, so defer OPENED events until they are fully initialized
+ */
+ *be_opened = false;
return vc_handler(backend->u.vc.data, errp);
}