aboutsummaryrefslogtreecommitdiff
path: root/stubs/uuid.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-09-21 12:27:14 +0800
committerFam Zheng <famz@redhat.com>2016-09-23 11:42:52 +0800
commitcea25275a3590cdee774a1230f4b99f6c5c0eaa8 (patch)
treed855702e66e12d2eb9c7cdfece84144ad453f874 /stubs/uuid.c
parent0679f98b4035c6c3125fc6720a961bb25f916a7a (diff)
downloadqemu-cea25275a3590cdee774a1230f4b99f6c5c0eaa8.zip
qemu-cea25275a3590cdee774a1230f4b99f6c5c0eaa8.tar.gz
qemu-cea25275a3590cdee774a1230f4b99f6c5c0eaa8.tar.bz2
util: Add UUID API
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard with only a small number of operations, it is cleaner to have a central support in libqemuutil. This patch adds qemu_uuid_* functions that all uuid users in the code base can rely on. Except for qemu_uuid_generate which is new code, all other functions are just copy from existing fallbacks from other files. Note that qemu_uuid_parse is moved without updating the function signature to use QemuUUID, to keep this patch simple. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
Diffstat (limited to 'stubs/uuid.c')
-rw-r--r--stubs/uuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stubs/uuid.c b/stubs/uuid.c
index 92ad717..a880de8 100644
--- a/stubs/uuid.c
+++ b/stubs/uuid.c
@@ -1,6 +1,6 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "sysemu/sysemu.h"
+#include "qemu/uuid.h"
#include "qmp-commands.h"
UuidInfo *qmp_query_uuid(Error **errp)