aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-04 09:05:31 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-05 18:39:02 +0200
commit4752cdbbf330ac7c593a6f337b97a79648f3f878 (patch)
tree3afdb213c68a2ef9443d91c5730b610098f832d4 /qapi
parent6446a592760155bb3e2e248d56bab97a34af0336 (diff)
downloadqemu-4752cdbbf330ac7c593a6f337b97a79648f3f878.zip
qemu-4752cdbbf330ac7c593a6f337b97a79648f3f878.tar.gz
qemu-4752cdbbf330ac7c593a6f337b97a79648f3f878.tar.bz2
qapi: Drop inline nested struct in query-version
A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit message for more details why); but existing use of inline nested structs conflicts with that goal. This patch fixes one of only two commands relying on nested types, by breaking the nesting into an explicit type; it means that the type is now boxed instead of unboxed in C code, but the QMP wire format is unaffected by this change. Prefer the safer g_new0() while making the conversion. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/common.json26
1 files changed, 19 insertions, 7 deletions
diff --git a/qapi/common.json b/qapi/common.json
index 12431c6..bad56bf 100644
--- a/qapi/common.json
+++ b/qapi/common.json
@@ -29,15 +29,28 @@
'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
##
-# @VersionInfo:
+# @VersionTriple
#
-# A description of QEMU's version.
+# A three-part version number.
+#
+# @qemu.major: The major version number.
#
-# @qemu.major: The major version of QEMU
+# @qemu.minor: The minor version number.
#
-# @qemu.minor: The minor version of QEMU
+# @qemu.micro: The micro version number.
+#
+# Since: 2.4
+##
+{ 'struct': 'VersionTriple',
+ 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
+
+
+##
+# @VersionInfo:
+#
+# A description of QEMU's version.
#
-# @qemu.micro: The micro version of QEMU. By current convention, a micro
+# @qemu: The version of QEMU. By current convention, a micro
# version of 50 signifies a development branch. A micro version
# greater than or equal to 90 signifies a release candidate for
# the next minor version. A micro version of less than 50
@@ -51,8 +64,7 @@
# Since: 0.14.0
##
{ 'struct': 'VersionInfo',
- 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
- 'package': 'str'} }
+ 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
##
# @query-version: