]>
git.proxmox.com Git - qemu.git/blob - qmp.c
2 * QEMU Management Protocol
4 * Copyright IBM, Corp. 2011
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #include "qemu-common.h"
16 #include "qmp-commands.h"
18 NameInfo
*qmp_query_name(Error
**errp
)
20 NameInfo
*info
= g_malloc0(sizeof(*info
));
23 info
->has_name
= true;
24 info
->name
= g_strdup(qemu_name
);
30 VersionInfo
*qmp_query_version(Error
**err
)
32 VersionInfo
*info
= g_malloc0(sizeof(*info
));
33 const char *version
= QEMU_VERSION
;
36 info
->qemu
.major
= strtol(version
, &tmp
, 10);
38 info
->qemu
.minor
= strtol(tmp
, &tmp
, 10);
40 info
->qemu
.micro
= strtol(tmp
, &tmp
, 10);
41 info
->package
= g_strdup(QEMU_PKGVERSION
);