-From f3aa6523c91f0259f7168a8bbcf978b2e42168f7 Mon Sep 17 00:00:00 2001
+From e453e9a98f7f0c2a213fe5bee04ece37ce10e625 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/41] qapi: modify query machines
+Subject: [PATCH 08/48] 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 9f54ebf..3ac59c5 100644
+index e7a8117..2c40928 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
-@@ -2790,6 +2790,8 @@
+@@ -4245,6 +4245,8 @@
#
- # @default: #optional whether the machine is default
+ # @is-default: whether the machine is default
#
-+# @current: #optional whether this machine is currently used
++# @is-current: whether this machine is currently used
+#
# @cpu-max: maximum number of CPUs supported by the machine type
# (since 1.5.0)
#
-@@ -2797,7 +2799,7 @@
+@@ -4254,7 +4256,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 4211ff1..77c734e 100644
+index 0b4ed52..868c489 100644
--- a/vl.c
+++ b/vl.c
-@@ -1523,6 +1523,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
- info->name = g_strdup(mc->name);
+@@ -1518,6 +1518,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
+ info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
+ if (strcmp(mc->name, MACHINE_GET_CLASS(current_machine)->name) == 0) {
+ info->has_is_current = true;