-From 7ec55edfacec8698e6fde6e8be0163e57526be2b Mon Sep 17 00:00:00 2001
+From a9503229ca99454a94045c1bf0cd285228ed2863 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
Date: Wed, 9 Dec 2015 14:31:18 +0100
-Subject: [PATCH 08/55] qapi: modify query machines
+Subject: [PATCH 08/41] qapi: modify query machines
provide '*is-current' in MachineInfo struct
---
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/qapi-schema.json b/qapi-schema.json
-index 639f7b6..0e97da1 100644
+index 4bf7222..63507f5 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
-@@ -2941,6 +2941,8 @@
+@@ -3027,6 +3027,8 @@
#
# @default: #optional whether the machine is default
#
# @cpu-max: maximum number of CPUs supported by the machine type
# (since 1.5.0)
#
-@@ -2948,7 +2950,7 @@
+@@ -3036,7 +3038,7 @@
##
{ 'struct': 'MachineInfo',
'data': { 'name': 'str', '*alias': 'str',
-- '*is-default': 'bool', 'cpu-max': 'int' } }
-+ '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int' } }
+- '*is-default': 'bool', 'cpu-max': 'int',
++ '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int',
+ 'hotpluggable-cpus': 'bool'} }
##
- # @query-machines:
diff --git a/vl.c b/vl.c
-index 5db5dc2..feeb2c4 100644
+index b3c80d5..bdf4fdc 100644
--- a/vl.c
+++ b/vl.c
-@@ -1538,6 +1538,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
- info->name = g_strdup(mc->name);
+@@ -1508,6 +1508,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
+ info->hotpluggable_cpus = !!mc->query_hotpluggable_cpus;
+ if (strcmp(mc->name, MACHINE_GET_CLASS(current_machine)->name) == 0) {
+ info->has_is_current = true;