aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-06-22 18:20:18 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-24 18:02:48 +0200
commit1ad78ea51aad7978638299a27004049935c2d913 (patch)
treedb3a45569be0c91e195a54e89425b61323fb90b9 /include/sysemu
parentbbfc2efefe9779f85dfe2713aec1568b1ba871ad (diff)
char: add qemu_chr_free()
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 <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/char.h10
1 files changed, 9 insertions, 1 deletions
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,11 +128,19 @@ 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:
*
* Ask the backend to override its normal echo setting. This only really