From 0ee20e665840d8a887c145b368ee121cb86a028e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 6 May 2013 15:58:04 +0200 Subject: ahci: Don't allow creating slave drives An IDE bus provided by AHCI can only take a single IDE drive. If you add a drive as slave, qemu used to accept the command line but the device wouldn't be actually usable. Catch the situation instead and error out. Signed-off-by: Kevin Wolf --- hw/ide/piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ide/piix.c') diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 1de284d..bf2856f 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -135,7 +135,7 @@ static void pci_piix_init_ports(PCIIDEState *d) { int i; for (i = 0; i < 2; i++) { - ide_bus_new(&d->bus[i], &d->dev.qdev, i); + ide_bus_new(&d->bus[i], &d->dev.qdev, i, 2); ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, port_info[i].iobase2); ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); -- cgit v1.1