summaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-08-31 14:24:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-09 14:57:19 -0500
commitd52affa7f6b9df3c7d44da0effbdfc8339c43914 (patch)
treef846e1baed7d228519ba95bfd3d915529e7172f9 /hw/qdev.c
parent5b19d9a247c47fe52c4f3d3e844009a689ee6b28 (diff)
downloadqemu-d52affa7f6b9df3c7d44da0effbdfc8339c43914.tar.gz
qemu-d52affa7f6b9df3c7d44da0effbdfc8339c43914.tar.bz2
qemu-d52affa7f6b9df3c7d44da0effbdfc8339c43914.zip
qdev/scsi: add scsi bus support to qdev, convert drivers.
* Add SCSIBus. * Add SCSIDeviceInfo, move device callbacks here. * add qdev/scsi helper functions. * convert drivers. Adding scsi disks via -device works now, i.e. you can do: -drive id=sda,if=none,... -device lsi -device scsi-disk,drive=sda legacy command lines (-drive if=scsi,...) continue to work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index f9754b1140..0e9732b1ca 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -314,25 +314,6 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name)
return NULL;
}
-static int next_scsi_bus;
-
-/* Create a scsi bus, and attach devices to it. */
-/* TODO: Actually create a scsi bus for hotplug to use. */
-void scsi_bus_new(DeviceState *host, SCSIAttachFn attach)
-{
- int bus = next_scsi_bus++;
- int unit;
- DriveInfo *dinfo;
-
- for (unit = 0; unit < MAX_SCSI_DEVS; unit++) {
- dinfo = drive_get(IF_SCSI, bus, unit);
- if (!dinfo) {
- continue;
- }
- attach(host, dinfo->bdrv, unit);
- }
-}
-
static BusState *qbus_find_recursive(BusState *bus, const char *name,
const BusInfo *info)
{