aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
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);
+}