aboutsummaryrefslogtreecommitdiff
path: root/hw/device-hotplug.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-22 16:42:59 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:08:23 -0500
commit3b0ba927931925f0f76509747ae145df30c97a05 (patch)
tree9cc87f7fdc24e49646c9095809a2767df7f02a89 /hw/device-hotplug.c
parent1dae12e6d02f8714c04bc0681ef4527980b13a9a (diff)
kill drives_opt
cleanup pretty simliar to the drives_table removal patch: - drop the table and make a linked list out of it. - pass around struct pointers instead of table indices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/device-hotplug.c')
-rw-r--r--hw/device-hotplug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index 5257274efd..8f0dec8b09 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -30,17 +30,17 @@
DriveInfo *add_init_drive(const char *opts)
{
- int drive_opt_idx;
int fatal_error;
DriveInfo *dinfo;
+ DriveOpt *dopt;
- drive_opt_idx = drive_add(NULL, "%s", opts);
- if (!drive_opt_idx)
+ dopt = drive_add(NULL, "%s", opts);
+ if (!dopt)
return NULL;
- dinfo = drive_init(&drives_opt[drive_opt_idx], 0, current_machine, &fatal_error);
+ dinfo = drive_init(dopt, 0, current_machine, &fatal_error);
if (!dinfo) {
- drive_remove(drive_opt_idx);
+ drive_remove(dopt);
return NULL;
}