diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-29 14:55:59 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-14 17:55:26 +0200 |
commit | 4ca172817a8c6df0145c16d80abdf04d53a56d92 (patch) | |
tree | d861459d34d0f21ada10c7eb2985d9bc18335d78 /include/sysemu/char.h | |
parent | d809ab9521ace32a806cdf86ee7df40e1bf88443 (diff) | |
download | hqemu-4ca172817a8c6df0145c16d80abdf04d53a56d92.zip hqemu-4ca172817a8c6df0145c16d80abdf04d53a56d92.tar.gz |
qemu-char: add create to register_char_driver
Having creation as a member of the CharDriver struct removes the need
to export functions for qemu-char.c's usage. After the conversion,
chardev backends implemented outside qemu-char.c will not need a stub
creation function anymore.
Ultimately all drivers will be converted. For now, support the case
where cd->create == NULL.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu/char.h')
-rw-r--r-- | include/sysemu/char.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 832b7fe..4b01a8c 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -345,7 +345,9 @@ bool chr_is_ringbuf(const CharDriverState *chr); QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename); void register_char_driver(const char *name, ChardevBackendKind kind, - void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp)); + void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp), + CharDriverState *(*create)(const char *id, ChardevBackend *backend, + ChardevReturn *ret, Error **errp)); /* add an eventfd to the qemu devices that are polled */ CharDriverState *qemu_chr_open_eventfd(int eventfd); |