diff options
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r-- | hw/ide/qdev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index b34c473336..2977a168e5 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -88,6 +88,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->conf.bs : NULL; + bs[1] = bus->slave ? bus->slave->conf.bs : NULL; +} + /* --------------------------------- */ typedef struct IDEDrive { |