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/cmd646.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ide/cmd646.c') diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 541d4ef..a73eb9a 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -281,7 +281,7 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) irq = qemu_allocate_irqs(cmd646_set_irq, d, 2); 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_init2(&d->bus[i], irq[i]); bmdma_init(&d->bus[i], &d->bmdma[i], d); -- cgit v1.1