summaryrefslogtreecommitdiff
path: root/include/sysemu
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 /include/sysemu
parentebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (diff)
downloadqemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.tar.gz
qemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.tar.bz2
qemu-82878dac6fcd16cb4fa47266bcd3dd03df436dae.zip
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 'include/sysemu')
-rw-r--r--include/sysemu/char.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index 0628b14531..0a149428cf 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -109,7 +109,6 @@ struct CharDriverState {
char *filename;
int logfd;
int be_open;
- int explicit_be_open;
int is_mux;
guint fd_in_tag;
bool replay;
@@ -474,10 +473,15 @@ void qemu_chr_set_feature(CharDriverState *chr,
CharDriverFeature feature);
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
+typedef void CharDriverParse(QemuOpts *opts, ChardevBackend *backend,
+ Error **errp);
+typedef CharDriverState *CharDriverCreate(const char *id,
+ ChardevBackend *backend,
+ ChardevReturn *ret, bool *be_opened,
+ Error **errp);
+
void register_char_driver(const char *name, ChardevBackendKind kind,
- void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp),
- CharDriverState *(*create)(const char *id, ChardevBackend *backend,
- ChardevReturn *ret, Error **errp));
+ CharDriverParse *parse, CharDriverCreate *create);
extern int term_escape_char;