aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_machine_pv.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen_machine_pv.c')
-rw-r--r--hw/xen_machine_pv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 6ae5000900..162f88db33 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -40,7 +40,8 @@ static void xen_init_pv(ram_addr_t ram_size,
const char *cpu_model)
{
CPUState *env;
- int i, index;
+ DriveInfo *dinfo;
+ int i;
/* Initialize a dummy CPU */
if (cpu_model == NULL) {
@@ -90,10 +91,10 @@ static void xen_init_pv(ram_addr_t ram_size,
/* configure disks */
for (i = 0; i < 16; i++) {
- index = drive_get_index(IF_XEN, 0, i);
- if (index == -1)
+ dinfo = drive_get(IF_XEN, 0, i);
+ if (!dinfo)
continue;
- xen_config_dev_blk(drives_table + index);
+ xen_config_dev_blk(dinfo);
}
/* configure nics */