From fb8b660e1718aaa77cccbda67af5727bb4a6250f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 15 Feb 2017 13:18:54 +0100 Subject: hw/scsi: Concentrate -drive if=scsi auto-create in one place The logic to create frontends for -drive if=scsi is in SCSI HBAs. For all other interface types, it's in machine initialization code. A few machine types create the SCSI HBAs necessary for that. That's also not done for other interface types. I'm going to deprecate these SCSI eccentricities. In preparation for that, create the frontends in main() instead of the SCSI HBAs, by calling new function scsi_legacy_handle_cmdline() there. Note that not all SCSI HBAs create frontends. Take care not to change that. Signed-off-by: Markus Armbruster Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com> Acked-By: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'hw/scsi/virtio-scsi.c') diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index b01030b745..4fb9259447 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -897,14 +897,6 @@ static void virtio_scsi_device_realize(DeviceState *dev, Error **errp) /* override default SCSI bus hotplug-handler, with virtio-scsi's one */ qbus_set_hotplug_handler(BUS(&s->bus), dev, &error_abort); - if (!dev->hotplugged) { - scsi_bus_legacy_handle_cmdline(&s->bus, &err); - if (err != NULL) { - error_propagate(errp, err); - return; - } - } - virtio_scsi_dataplane_setup(s, errp); } -- cgit v1.2.3