summaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-09-13 17:16:25 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-04 11:02:57 -0300
commitefab767eaafe39a234e8244819d0969ff59a325a (patch)
tree08406c2ce1553d34f7c5d60cf75b4cb55be2b343 /qmp.c
parent1fa9a5e4aea36b4d21e42323ae43879c908af576 (diff)
downloadqemu-efab767eaafe39a234e8244819d0969ff59a325a.tar.gz
qapi: Convert query-uuid
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/qmp.c b/qmp.c
index 8f7f666bbf..58337c79f1 100644
--- a/qmp.c
+++ b/qmp.c
@@ -55,3 +55,18 @@ KvmInfo *qmp_query_kvm(Error **errp)
return info;
}
+UuidInfo *qmp_query_uuid(Error **errp)
+{
+ UuidInfo *info = g_malloc0(sizeof(*info));
+ char uuid[64];
+
+ snprintf(uuid, sizeof(uuid), 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]);
+
+ info->UUID = g_strdup(uuid);
+ return info;
+}
+