drive cleanup fixes.

Changes:
  * drive_uninit() wants a DriveInfo now.
  * drive_uninit() also calls bdrv_delete(),
    so callers don't need to do that.
  * drive_uninit() calls are moved over to the ->exit()
    callbacks, destroy_bdrvs() is zapped.
  * setting bdrv->private is not needed any more as the
    only user (destroy_bdrvs) is gone.
  * usb-storage needs no drive_uninit, scsi-disk will
    handle that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2009-09-25 21:42:46 +02:00 committed by Anthony Liguori
parent 3f84865ade
commit 56a1493880
9 changed files with 25 additions and 43 deletions

View file

@ -668,6 +668,8 @@ static void scsi_destroy(SCSIDevice *d)
qemu_free(r);
r = n;
}
drive_uninit(s->dinfo);
}
static int scsi_generic_initfn(SCSIDevice *dev)