diff options
author | Marcel Apfelbaum <marcel.a@redhat.com> | 2014-03-05 19:30:47 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-12 20:13:02 +0100 |
commit | 0056ae24bc36798fdd96d0b31e217e9f73896736 (patch) | |
tree | e96c46ebcc19086f0b115f3da263d18a8f32dc2e /qmp.c | |
parent | 261747f176f6f2d88f8268aaebfdd1a1afe887e2 (diff) | |
download | qemu-0056ae24bc36798fdd96d0b31e217e9f73896736.zip qemu-0056ae24bc36798fdd96d0b31e217e9f73896736.tar.gz qemu-0056ae24bc36798fdd96d0b31e217e9f73896736.tar.bz2 |
hw/boards: Convert current_machine to MachineState
In order to allow attaching machine options to a machine instance,
current_machine is converted into MachineState.
As a first step of deprecating QEMUMachine, some of the functions
were modified to return MachineClass.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -114,8 +114,11 @@ void qmp_cpu(int64_t index, Error **errp) void qmp_cpu_add(int64_t id, Error **errp) { - if (current_machine->hot_add_cpu) { - current_machine->hot_add_cpu(id, errp); + MachineClass *mc; + + mc = MACHINE_GET_CLASS(current_machine); + if (mc->qemu_machine->hot_add_cpu) { + mc->qemu_machine->hot_add_cpu(id, errp); } else { error_setg(errp, "Not supported"); } |