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/macio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ide/macio.c') diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 64b2406ab0..bf12a100d4 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -334,7 +334,7 @@ static void macio_ide_initfn(Object *obj) SysBusDevice *d = SYS_BUS_DEVICE(obj); MACIOIDEState *s = MACIO_IDE(obj); - ide_bus_new(&s->bus, DEVICE(obj), 0); + ide_bus_new(&s->bus, DEVICE(obj), 0, 2); memory_region_init_io(&s->mem, &pmac_ide_ops, s, "pmac-ide", 0x1000); sysbus_init_mmio(d, &s->mem); sysbus_init_irq(d, &s->irq); -- cgit v1.2.1