]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/modify-query-machines.patch
refresh and enable debian/patches/modify-query-machines.patch
[pve-qemu-kvm.git] / debian / patches / modify-query-machines.patch
1 Index: new/qapi-schema.json
2 ===================================================================
3 --- new.orig/qapi-schema.json 2014-05-05 07:54:16.000000000 +0200
4 +++ new/qapi-schema.json 2014-05-05 08:09:23.000000000 +0200
5 @@ -3431,6 +3431,8 @@
6 #
7 # @default: #optional whether the machine is default
8 #
9 +# @current: #optional whether this machine is currently used
10 +#
11 # @cpu-max: maximum number of CPUs supported by the machine type
12 # (since 1.5.0)
13 #
14 @@ -3438,7 +3440,7 @@
15 ##
16 { 'type': 'MachineInfo',
17 'data': { 'name': 'str', '*alias': 'str',
18 - '*is-default': 'bool', 'cpu-max': 'int' } }
19 + '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int' } }
20
21 ##
22 # @query-machines:
23 Index: new/vl.c
24 ===================================================================
25 --- new.orig/vl.c 2014-05-05 07:54:16.000000000 +0200
26 +++ new/vl.c 2014-05-05 08:14:33.000000000 +0200
27 @@ -1673,6 +1673,11 @@
28 info->name = g_strdup(m->name);
29 info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
30
31 + if (strcmp(m->name, MACHINE_GET_CLASS(current_machine)->qemu_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;