summaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-01-28 11:21:37 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:24:11 +0100
commit5b33d3ab68bcea3b9e58c66aa401741a3be9a6c7 (patch)
tree536cfb5745cf7b76304d7a01fec3d48befb59ec1 /hw/qdev.c
parent5587621c4a94fc333b8bc7f7a86e031b9eb669b0 (diff)
downloadqemu-5b33d3ab68bcea3b9e58c66aa401741a3be9a6c7.tar.gz
qemu-5b33d3ab68bcea3b9e58c66aa401741a3be9a6c7.tar.bz2
qemu-5b33d3ab68bcea3b9e58c66aa401741a3be9a6c7.zip
blockdev: New drive_get_next(), replacing qdev_init_bdrv()
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus DeviceState argument, and return DriveInfo instead of BlockDriverState. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 5b8d3742ec..0c94fb2eb6 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -458,20 +458,6 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
}
}
-static int next_block_unit[IF_COUNT];
-
-/* Get a block device. This should only be used for single-drive devices
- (e.g. SD/Floppy/MTD). Multi-disk devices (scsi/ide) should use the
- appropriate bus. */
-BlockDriverState *qdev_init_bdrv(DeviceState *dev, BlockInterfaceType type)
-{
- int unit = next_block_unit[type]++;
- DriveInfo *dinfo;
-
- dinfo = drive_get(type, 0, unit);
- return dinfo ? dinfo->bdrv : NULL;
-}
-
BusState *qdev_get_child_bus(DeviceState *dev, const char *name)
{
BusState *bus;