From 0056ae24bc36798fdd96d0b31e217e9f73896736 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 5 Mar 2014 19:30:47 +0200 Subject: hw/boards: Convert current_machine to MachineState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andreas Färber --- device-hotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'device-hotplug.c') 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; -- cgit v1.2.1