qemu-e2k/hw/mips
Markus Armbruster 8f2d75e81d hw: Drop superfluous special checks for orphaned -drive
We've traditionally rejected orphans here and there, but not
systematically.  For instance, the sun4m machines have an onboard SCSI
HBA (bus=0), and have always rejected bus>0.  Other machines with an
onboard SCSI HBA don't.

Commit a66c9dc made all orphans trigger a warning, and the previous
commit turned this into an error.  The checks "here and there" are now
redundant.  Drop them.

Note that the one in mips_jazz.c was wrong: it rejected bus > MAX_FD,
but MAX_FD is the number of floppy drives per bus.

Error messages change from

    $ qemu-system-x86_64 -drive if=ide,bus=2
    qemu-system-x86_64: Too many IDE buses defined (3 > 2)
    $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1
    qemu: too many floppy drives
    $ qemu-system-sparc -M LX -drive if=scsi,bus=1
    qemu: too many SCSI bus

to

    $ qemu-system-x86_64 -drive if=ide,bus=2
    qemu-system-x86_64: -drive if=ide,bus=2: machine type does not support if=ide,bus=2,unit=0
    $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1
    qemu-system-mips64: -drive if=floppy,bus=2,id=fd1: machine type does not support if=floppy,bus=2,unit=0
    $ qemu-system-sparc -M LX -drive if=scsi,bus=1
    qemu-system-sparc: -drive if=scsi,bus=1: machine type does not support if=scsi,bus=1,unit=0

Cc: John Snow <jsnow@redhat.com>
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1487153147-11530-9-git-send-email-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
2017-02-21 13:17:45 +01:00
..
addr.c mips: Clean up includes 2016-01-23 14:30:04 +00:00
cps.c error: Strip trailing '\n' from error string arguments (again) 2016-08-08 09:00:44 +02:00
cputimer.c mips: use MIPSCPU instead of CPUMIPSState 2016-05-19 16:42:27 +02:00
gt64xxx_pci.c hw/mips: fix PCI bus initialization 2016-07-20 19:30:26 +03:00
Makefile.objs hw/mips: implement generic MIPS Coherent Processing System container 2016-03-30 09:13:58 +01:00
mips_fulong2e.c hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
mips_int.c mips: use MIPSCPU instead of CPUMIPSState 2016-05-19 16:42:27 +02:00
mips_jazz.c hw: Drop superfluous special checks for orphaned -drive 2017-02-21 13:17:45 +01:00
mips_malta.c hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
mips_mipssim.c mips: use MIPSCPU instead of CPUMIPSState 2016-05-19 16:42:27 +02:00
mips_r4k.c hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00