aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-08-26 17:38:13 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-04 11:01:30 -0300
commitb9c15f16d702306aeb984f30490cddb8b418a231 (patch)
tree6952fefe9fb9e4470556c8788032ff53bd0a8572 /hmp.c
parent48a32bedfed0ea5b30bdbb470c0520acdadc3bf2 (diff)
qapi: Convert query-version
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 47e1ff75cd..bb6c86f259 100644
--- a/hmp.c
+++ b/hmp.c
@@ -24,3 +24,16 @@ void hmp_info_name(Monitor *mon)
}
qapi_free_NameInfo(info);
}
+
+void hmp_info_version(Monitor *mon)
+{
+ VersionInfo *info;
+
+ info = qmp_query_version(NULL);
+
+ monitor_printf(mon, "%" PRId64 ".%" PRId64 ".%" PRId64 "%s\n",
+ info->qemu.major, info->qemu.minor, info->qemu.micro,
+ info->package);
+
+ qapi_free_VersionInfo(info);
+}