diff options
author | Fam Zheng <famz@redhat.com> | 2016-09-21 12:27:22 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2016-09-23 11:42:52 +0800 |
commit | 9c5ce8db2e5c2769ed2fd3d91928dd1853b5ce7c (patch) | |
tree | c7fc6da1885972db475b47cbc169ebc8d7b058a6 /hw/xenpv/xen_domainbuild.c | |
parent | 315d3184525c90865bf5e1ec4db5e633f1d8c7e8 (diff) | |
download | qemu-9c5ce8db2e5c2769ed2fd3d91928dd1853b5ce7c.zip qemu-9c5ce8db2e5c2769ed2fd3d91928dd1853b5ce7c.tar.gz qemu-9c5ce8db2e5c2769ed2fd3d91928dd1853b5ce7c.tar.bz2 |
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 'hw/xenpv/xen_domainbuild.c')
-rw-r--r-- | hw/xenpv/xen_domainbuild.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/xenpv/xen_domainbuild.c b/hw/xenpv/xen_domainbuild.c index 5a9f5ac..b439b0e 100644 --- a/hw/xenpv/xen_domainbuild.c +++ b/hw/xenpv/xen_domainbuild.c @@ -53,11 +53,7 @@ int xenstore_domain_init1(const char *kernel, const char *ramdisk, char *dom, uuid_string[42], vm[256], path[256]; int i; - snprintf(uuid_string, sizeof(uuid_string), UUID_FMT, - qemu_uuid[0], qemu_uuid[1], qemu_uuid[2], qemu_uuid[3], - qemu_uuid[4], qemu_uuid[5], qemu_uuid[6], qemu_uuid[7], - qemu_uuid[8], qemu_uuid[9], qemu_uuid[10], qemu_uuid[11], - qemu_uuid[12], qemu_uuid[13], qemu_uuid[14], qemu_uuid[15]); + qemu_uuid_unparse(&qemu_uuid, uuid_string); dom = xs_get_domain_path(xenstore, xen_domid); snprintf(vm, sizeof(vm), "/vm/%s", uuid_string); |