diff options
author | Marc-André Lureau | 2019-10-21 16:31:31 +0200 |
---|---|---|
committer | Marc-André Lureau | 2020-01-07 13:50:09 +0100 |
commit | 1e419ee68fa545421e3a6d5ea32d04e9a20dfbf2 (patch) | |
tree | 146036e88b4a3689cf2f7aaf76f872712d0449f4 /include/qemu | |
parent | sysbus: remove outdated comment (diff) | |
download | qemu-1e419ee68fa545421e3a6d5ea32d04e9a20dfbf2.tar.gz qemu-1e419ee68fa545421e3a6d5ea32d04e9a20dfbf2.tar.xz qemu-1e419ee68fa545421e3a6d5ea32d04e9a20dfbf2.zip |
chardev: generate an internal id when none given
Internally, qemu may create chardev without ID. Those will not be
looked up with qemu_chr_find(), which prevents using qdev_prop_set_chr().
Use id_generate(), to generate an internal name (prefixed with #), so
no conflict exist with user-named chardev.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: xiaoqiang zhao <zxq_yx_007@163.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/id.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/id.h b/include/qemu/id.h index 40c70103e4..b55c406e69 100644 --- a/include/qemu/id.h +++ b/include/qemu/id.h @@ -4,6 +4,7 @@ typedef enum IdSubSystems { ID_QDEV, ID_BLOCK, + ID_CHR, ID_MAX /* last element, used as array size */ } IdSubSystems; |