summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r--hw/ide/qdev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 0b84a4f1d..a621d5edd 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -90,6 +90,13 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
return DO_UPCAST(IDEDevice, qdev, dev);
}
+void ide_get_bs(BlockDriverState *bs[], BusState *qbus)
+{
+ IDEBus *bus = DO_UPCAST(IDEBus, qbus, qbus);
+ bs[0] = bus->master ? bus->master->dinfo->bdrv : NULL;
+ bs[1] = bus->slave ? bus->slave->dinfo->bdrv : NULL;
+}
+
/* --------------------------------- */
typedef struct IDEDrive {