From c5514d0e4bafde751ec09439ba042b1f1cda37a7 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Fri, 10 Feb 2017 11:20:57 +0100 Subject: machine: replace query_hotpluggable_cpus() callback with has_hotpluggable_cpus flag Generic helper machine_query_hotpluggable_cpus() replaced target specific query_hotpluggable_cpus() callbacks so there is no need in it anymore. However inon NULL callback value is used to detect/report hotpluggable cpus support, therefore it can be removed completely. Replace it with MachineClass.has_hotpluggable_cpus boolean which is sufficient for the task. Suggested-by: David Gibson Signed-off-by: Igor Mammedov Signed-off-by: David Gibson --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index b5d0a19..904e34b 100644 --- a/vl.c +++ b/vl.c @@ -1492,7 +1492,7 @@ MachineInfoList *qmp_query_machines(Error **errp) info->name = g_strdup(mc->name); info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus; - info->hotpluggable_cpus = !!mc->query_hotpluggable_cpus; + info->hotpluggable_cpus = mc->has_hotpluggable_cpus; entry = g_malloc0(sizeof(*entry)); entry->value = info; -- cgit v1.1