aboutsummaryrefslogtreecommitdiff
path: root/device-hotplug.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-03-05 19:30:47 +0200
committerAndreas Färber <afaerber@suse.de>2014-03-12 20:13:02 +0100
commit0056ae24bc36798fdd96d0b31e217e9f73896736 (patch)
treee96c46ebcc19086f0b115f3da263d18a8f32dc2e /device-hotplug.c
parent261747f176f6f2d88f8268aaebfdd1a1afe887e2 (diff)
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 'device-hotplug.c')
-rw-r--r--device-hotplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/device-hotplug.c b/device-hotplug.c
index 103d34ac45..ebfa6b1016 100644
--- a/device-hotplug.c
+++ b/device-hotplug.c
@@ -33,12 +33,14 @@ DriveInfo *add_init_drive(const char *optstr)
{
DriveInfo *dinfo;
QemuOpts *opts;
+ MachineClass *mc;
opts = drive_def(optstr);
if (!opts)
return NULL;
- dinfo = drive_init(opts, current_machine->block_default_type);
+ mc = MACHINE_GET_CLASS(current_machine);
+ dinfo = drive_init(opts, mc->qemu_machine->block_default_type);
if (!dinfo) {
qemu_opts_del(opts);
return NULL;