summaryrefslogtreecommitdiff
path: root/hw/ide/mmio.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-05-06 15:58:04 +0200
committerKevin Wolf <kwolf@redhat.com>2013-05-08 15:28:49 +0200
commit0ee20e665840d8a887c145b368ee121cb86a028e (patch)
tree6908ec6f1357c52a71c71896699e7e03ce8d0496 /hw/ide/mmio.c
parent15d23fb96656b1ae31bf4305b2108230c29298c6 (diff)
downloadqemu-0ee20e665840d8a887c145b368ee121cb86a028e.tar.gz
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 <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/mmio.c')
-rw-r--r--hw/ide/mmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index ce88c3a651..e80e7e5af8 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -137,7 +137,7 @@ static void mmio_ide_initfn(Object *obj)
SysBusDevice *d = SYS_BUS_DEVICE(obj);
MMIOState *s = MMIO_IDE(obj);
- ide_bus_new(&s->bus, DEVICE(obj), 0);
+ ide_bus_new(&s->bus, DEVICE(obj), 0, 2);
sysbus_init_irq(d, &s->irq);
}