]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/modify-query-machines.patch
refresh and enable debian/patches/set-cpu-model-to-kvm64.patch
[pve-qemu-kvm.git] / debian / patches / modify-query-machines.patch
CommitLineData
ff60a765
DM
1Index: new/qapi-schema.json
2===================================================================
667f3633
DM
3--- new.orig/qapi-schema.json 2013-11-27 11:35:03.000000000 +0100
4+++ new/qapi-schema.json 2013-11-27 11:41:45.000000000 +0100
5@@ -3180,6 +3180,8 @@
ff60a765
DM
6 #
7 # @default: #optional whether the machine is default
8 #
9+# @current: #optional whether this machine is currently used
10+#
667f3633
DM
11 # @cpu-max: maximum number of CPUs supported by the machine type
12 # (since 1.5.0)
13 #
14@@ -3187,7 +3189,7 @@
ff60a765
DM
15 ##
16 { 'type': 'MachineInfo',
17 'data': { 'name': 'str', '*alias': 'str',
667f3633
DM
18- '*is-default': 'bool', 'cpu-max': 'int' } }
19+ '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int' } }
ff60a765
DM
20
21 ##
22 # @query-machines:
23Index: new/vl.c
24===================================================================
667f3633
DM
25--- new.orig/vl.c 2013-11-27 11:27:31.000000000 +0100
26+++ new/vl.c 2013-11-27 11:38:27.000000000 +0100
27@@ -1643,6 +1643,11 @@
ff60a765 28 info->name = g_strdup(m->name);
667f3633 29 info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
ff60a765
DM
30
31+ if (strcmp(m->name, current_machine->name) == 0) {
32+ info->has_is_current = true;
33+ info->is_current = true;
34+ }
35+
36 entry = g_malloc0(sizeof(*entry));
37 entry->value = info;
38 entry->next = mach_list;