mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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:
parent
3f84865ade
commit
56a1493880
9 changed files with 25 additions and 43 deletions
3
sysemu.h
3
sysemu.h
|
@ -190,7 +190,7 @@ extern QTAILQ_HEAD(driveoptlist, DriveOpt) driveopts;
|
|||
extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
|
||||
extern DriveInfo *drive_get_by_id(const char *id);
|
||||
extern int drive_get_max_bus(BlockInterfaceType type);
|
||||
extern void drive_uninit(BlockDriverState *bdrv);
|
||||
extern void drive_uninit(DriveInfo *dinfo);
|
||||
extern const char *drive_get_serial(BlockDriverState *bdrv);
|
||||
extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv);
|
||||
|
||||
|
@ -205,7 +205,6 @@ typedef int (dev_match_fn)(void *dev_private, void *arg);
|
|||
|
||||
DriveInfo *add_init_drive(const char *opts);
|
||||
void destroy_nic(dev_match_fn *match_fn, void *arg);
|
||||
void destroy_bdrvs(dev_match_fn *match_fn, void *arg);
|
||||
|
||||
/* pci-hotplug */
|
||||
void pci_device_hot_add(Monitor *mon, const QDict *qdict);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue