diff options
author | Marc-André Lureau | 2017-01-26 21:49:13 +0100 |
---|---|---|
committer | Marc-André Lureau | 2017-06-02 09:33:53 +0200 |
commit | 1ce2610c106d925387669b3133fc18ea986f0476 (patch) | |
tree | bd08c41941ea2235cabde4c02739f6ca52ff07d7 /include/chardev/char-fe.h | |
parent | char: rename functions that are not part of fe (diff) | |
download | qemu-1ce2610c106d925387669b3133fc18ea986f0476.tar.gz qemu-1ce2610c106d925387669b3133fc18ea986f0476.tar.xz qemu-1ce2610c106d925387669b3133fc18ea986f0476.zip |
char: make chr_fe_deinit() optionaly delete backend
This simplifies removing a backend for a frontend user (no need to
retrieve the associated driver and separate delete call etc).
NB: many frontends have questionable handling of ending a chardev. They
should probably delete the backend to prevent broken reusage.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include/chardev/char-fe.h')
-rw-r--r-- | include/chardev/char-fe.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index bd82093218..2cbb262f66 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -30,12 +30,14 @@ bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp); /** * @qemu_chr_fe_deinit: - * + * @b: a CharBackend + * @del: if true, delete the chardev backend +* * Dissociate the CharBackend from the Chardev. * * Safe to call without associated Chardev. */ -void qemu_chr_fe_deinit(CharBackend *b); +void qemu_chr_fe_deinit(CharBackend *b, bool del); /** * @qemu_chr_fe_get_driver: |