mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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 <armbru@redhat.com> Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com> Acked-By: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8f2d75e81d
commit
fb8b660e17
10 changed files with 44 additions and 39 deletions
4
vl.c
4
vl.c
|
@ -62,6 +62,7 @@ int main(int argc, char **argv)
|
|||
#include "hw/usb.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "hw/scsi/scsi.h"
|
||||
#include "hw/bt.h"
|
||||
#include "sysemu/watchdog.h"
|
||||
#include "hw/smbios/smbios.h"
|
||||
|
@ -4509,6 +4510,9 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
rom_reset_order_override();
|
||||
|
||||
/* Create frontends for -drive if=scsi */
|
||||
scsi_legacy_handle_cmdline();
|
||||
|
||||
/* Did we create any drives that we failed to create a device for? */
|
||||
drive_check_orphaned();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue