part 1 of 2.4 patch update series
[pve-qemu-kvm.git] / debian / patches / modify-query-machines.patch
blob5edcdd2ba90d8fff4825ca0f4e533a9325147d50
1 Index: new/qapi-schema.json
2 ===================================================================
3 --- new.orig/qapi-schema.json 2014-11-20 07:26:23.000000000 +0100
4 +++ new/qapi-schema.json 2014-11-20 07:26:39.000000000 +0100
5 @@ -2393,6 +2393,8 @@
7 # @default: #optional whether the machine is default
9 +# @current: #optional whether this machine is currently used
11 # @cpu-max: maximum number of CPUs supported by the machine type
12 # (since 1.5.0)
14 @@ -2400,7 +2402,7 @@
16 { 'struct': 'MachineInfo',
17 'data': { 'name': 'str', '*alias': 'str',
18 - '*is-default': 'bool', 'cpu-max': 'int' } }
19 + '*is-default': 'bool', '*is-current': 'bool', 'cpu-max': 'int' } }
22 # @query-machines:
23 Index: new/vl.c
24 ===================================================================
25 --- new.orig/vl.c 2014-11-20 06:50:55.000000000 +0100
26 +++ new/vl.c 2014-11-20 07:26:39.000000000 +0100
27 @@ -1534,6 +1534,11 @@
28 info->name = g_strdup(mc->name);
29 info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
31 + if (strcmp(mc->name, MACHINE_GET_CLASS(current_machine)->name) == 0) {
32 + info->has_is_current = true;
33 + info->is_current = true;
34 + }
36 entry = g_malloc0(sizeof(*entry));
37 entry->value = info;
38 entry->next = mach_list;