From 1ad78ea51aad7978638299a27004049935c2d913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 22 Jun 2015 18:20:18 +0200 Subject: char: add qemu_chr_free() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a chardev is allowed to be created outside of QMP, then it must be also possible to free it. This is useful for ivshmem that creates chardev anonymously and must be able to free them. Signed-off-by: Marc-André Lureau Acked-by: Paolo Bonzini Reviewed-by: Claudio Fontana --- include/sysemu/char.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/sysemu') diff --git a/include/sysemu/char.h b/include/sysemu/char.h index edf76693d9..aff193f080 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -128,10 +128,18 @@ CharDriverState *qemu_chr_new(const char *label, const char *filename, /** * @qemu_chr_delete: * - * Destroy a character backend. + * Destroy a character backend and remove it from the list of + * identified character backends. */ void qemu_chr_delete(CharDriverState *chr); +/** + * @qemu_chr_free: + * + * Destroy a character backend. + */ +void qemu_chr_free(CharDriverState *chr); + /** * @qemu_chr_fe_set_echo: * -- cgit v1.2.3