mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 21:40:49 +00:00
1e419ee68f
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>
15 lines
256 B
C
15 lines
256 B
C
#ifndef QEMU_ID_H
|
|
#define QEMU_ID_H
|
|
|
|
typedef enum IdSubSystems {
|
|
ID_QDEV,
|
|
ID_BLOCK,
|
|
ID_CHR,
|
|
ID_MAX /* last element, used as array size */
|
|
} IdSubSystems;
|
|
|
|
char *id_generate(IdSubSystems id);
|
|
bool id_wellformed(const char *id);
|
|
|
|
#endif
|