diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-10-22 13:09:43 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-24 15:46:11 +0200 |
commit | 82878dac6fcd16cb4fa47266bcd3dd03df436dae (patch) | |
tree | 7f16567124bb2ae28efea46144f648a2895a4e92 /include/sysemu/char.h | |
parent | ebf4c54d4b24badc88a9f3e23f1540003e1f7cd7 (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 'include/sysemu/char.h')
-rw-r--r-- | include/sysemu/char.h | 12 |
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; |