aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-15 11:05:47 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-02-21 13:17:45 +0100
commit8f2d75e81d5eb2715be653010258ce9d57549de7 (patch)
tree532a0bf101c75d877768c876da14ae893e4945a1 /hw/ide
parent720b8dc052ae2783d9b8cc2263eccc5bcec04418 (diff)
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>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/core.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 43709e545f..cfa5de6ebf 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2840,23 +2840,6 @@ const VMStateDescription vmstate_ide_bus = {
void ide_drive_get(DriveInfo **hd, int n)
{
int i;
- int highest_bus = drive_get_max_bus(IF_IDE) + 1;
- int max_devs = drive_get_max_devs(IF_IDE);
- int n_buses = max_devs ? (n / max_devs) : n;
-
- /*
- * Note: The number of actual buses available is not known.
- * We compute this based on the size of the DriveInfo* array, n.
- * If it is less than max_devs * <num_real_buses>,
- * We will stop looking for drives prematurely instead of overfilling
- * the array.
- */
-
- if (highest_bus > n_buses) {
- error_report("Too many IDE buses defined (%d > %d)",
- highest_bus, n_buses);
- exit(1);
- }
for (i = 0; i < n; i++) {
hd[i] = drive_get_by_index(IF_IDE, i);