summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini2020-11-30 19:44:49 +0100
committerPaolo Bonzini2020-12-15 18:51:51 +0100
commit5a1ee6077b89ee9a803aaf8d1c98004701f63684 (patch)
treeff3c0d5a2fc247b49974c38e2ccd9a1902a08b3f /include
parentvl: move all generic initialization out of vl.c (diff)
downloadqemu-5a1ee6077b89ee9a803aaf8d1c98004701f63684.tar.gz
qemu-5a1ee6077b89ee9a803aaf8d1c98004701f63684.tar.xz
qemu-5a1ee6077b89ee9a803aaf8d1c98004701f63684.zip
chardev: do not use machine_init_done
machine_init_done is not the right flag to check when preconfig is taken into account; for example "./qemu-system-x86_64 -serial mon:stdio -preconfig" does not print the QEMU monitor header until after exit_preconfig. Add back a custom bool for mux character devices. This partially undoes commit c7278b4355 ("chardev: introduce chr_machine_done hook", 2018-03-12), but it keeps the cleaner logic using a function pointer in ChardevClass. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/chardev/char.h6
-rw-r--r--include/sysemu/sysemu.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/chardev/char.h b/include/chardev/char.h
index db42f0a8c6..4181a2784a 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -270,8 +270,7 @@ struct ChardevClass {
void (*chr_set_echo)(Chardev *chr, bool echo);
void (*chr_set_fe_open)(Chardev *chr, int fe_open);
void (*chr_be_event)(Chardev *s, QEMUChrEvent event);
- /* Return 0 if succeeded, 1 if failed */
- int (*chr_machine_done)(Chardev *chr);
+ void (*chr_options_parsed)(Chardev *chr);
};
Chardev *qemu_chardev_new(const char *id, const char *typename,
@@ -283,6 +282,9 @@ extern int term_escape_char;
GSource *qemu_chr_timeout_add_ms(Chardev *chr, guint ms,
GSourceFunc func, void *private);
+void suspend_mux_open(void);
+void resume_mux_open(void);
+
/* console.c */
void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp);
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 0e7b405d22..9b47cdca55 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -16,8 +16,6 @@ extern bool qemu_uuid_set;
void qemu_add_exit_notifier(Notifier *notify);
void qemu_remove_exit_notifier(Notifier *notify);
-extern bool machine_init_done;
-
void qemu_run_machine_init_done_notifiers(void);
void qemu_add_machine_init_done_notifier(Notifier *notify);
void qemu_remove_machine_init_done_notifier(Notifier *notify);