diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-13 17:16:25 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:02:57 -0300 |
commit | efab767eaafe39a234e8244819d0969ff59a325a (patch) | |
tree | 08406c2ce1553d34f7c5d60cf75b4cb55be2b343 /qmp.c | |
parent | 1fa9a5e4aea36b4d21e42323ae43879c908af576 (diff) |
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.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; +} + |