diff options
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -26,3 +26,19 @@ NameInfo *qmp_query_name(Error **errp) return info; } + +VersionInfo *qmp_query_version(Error **err) +{ + VersionInfo *info = g_malloc0(sizeof(*info)); + const char *version = QEMU_VERSION; + char *tmp; + + info->qemu.major = strtol(version, &tmp, 10); + tmp++; + info->qemu.minor = strtol(tmp, &tmp, 10); + tmp++; + info->qemu.micro = strtol(tmp, &tmp, 10); + info->package = g_strdup(QEMU_PKGVERSION); + + return info; +} |