mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-30 15:00:34 +00:00
27eb3722e4
We already got a global function called id_generate() to create unique IDs within QEMU. Let's use it in the network subsytem, too, instead of inventing our own ID scheme here. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210215090225.1046239-1-thuth@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
16 lines
268 B
C
16 lines
268 B
C
#ifndef QEMU_ID_H
|
|
#define QEMU_ID_H
|
|
|
|
typedef enum IdSubSystems {
|
|
ID_QDEV,
|
|
ID_BLOCK,
|
|
ID_CHR,
|
|
ID_NET,
|
|
ID_MAX /* last element, used as array size */
|
|
} IdSubSystems;
|
|
|
|
char *id_generate(IdSubSystems id);
|
|
bool id_wellformed(const char *id);
|
|
|
|
#endif
|