machine: Remove QEMUMachine indirection from MachineClass

No need to go through qemu_machine field. Use
MachineClass fields directly.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Marcel Apfelbaum 2014-04-09 20:34:53 +03:00 committed by Andreas Färber
parent f1e298794d
commit 958db90cd5
5 changed files with 49 additions and 86 deletions

4
qmp.c
View file

@ -117,8 +117,8 @@ void qmp_cpu_add(int64_t id, Error **errp)
MachineClass *mc;
mc = MACHINE_GET_CLASS(current_machine);
if (mc->qemu_machine->hot_add_cpu) {
mc->qemu_machine->hot_add_cpu(id, errp);
if (mc->hot_add_cpu) {
mc->hot_add_cpu(id, errp);
} else {
error_setg(errp, "Not supported");
}