aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-09-21 12:27:22 +0800
committerFam Zheng <famz@redhat.com>2016-09-23 11:42:52 +0800
commit9c5ce8db2e5c2769ed2fd3d91928dd1853b5ce7c (patch)
treec7fc6da1885972db475b47cbc169ebc8d7b058a6 /include
parent315d3184525c90865bf5e1ec4db5e633f1d8c7e8 (diff)
vl: Switch qemu_uuid to QemuUUID
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to QemuUUID is done here too to keep everything in sync and avoid code churn. 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-10-git-send-email-famz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/uuid.h2
-rw-r--r--include/sysemu/sysemu.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
index bc0601e65b..afe4840296 100644
--- a/include/qemu/uuid.h
+++ b/include/qemu/uuid.h
@@ -52,7 +52,7 @@ void qemu_uuid_unparse(const QemuUUID *uuid, char *out);
char *qemu_uuid_unparse_strdup(const QemuUUID *uuid);
-int qemu_uuid_parse(const char *str, uint8_t *uuid);
+int qemu_uuid_parse(const char *str, QemuUUID *uuid);
void qemu_uuid_bswap(QemuUUID *uuid);
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 6111950d51..ef2c50bb04 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -9,6 +9,7 @@
#include "qemu/notify.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
+#include "qemu/uuid.h"
#include "qom/object.h"
/* vl.c */
@@ -16,7 +17,7 @@
extern const char *bios_name;
extern const char *qemu_name;
-extern uint8_t qemu_uuid[];
+extern QemuUUID qemu_uuid;
extern bool qemu_uuid_set;
bool runstate_check(RunState state);