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 --- include/hw/scsi/scsi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/hw/scsi') diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 9bad49e917..eeef949b66 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -177,7 +177,8 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d) SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk, int unit, bool removable, int bootindex, const char *serial, Error **errp); -void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, Error **errp); +void scsi_bus_legacy_handle_cmdline(SCSIBus *bus); +void scsi_legacy_handle_cmdline(void); /* * Predefined sense codes -- cgit v1.2.3