diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-05-06 15:58:04 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-05-08 15:28:49 +0200 |
commit | 0ee20e665840d8a887c145b368ee121cb86a028e (patch) | |
tree | 6908ec6f1357c52a71c71896699e7e03ce8d0496 /hw/ide/internal.h | |
parent | 15d23fb96656b1ae31bf4305b2108230c29298c6 (diff) |
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/internal.h')
-rw-r--r-- | hw/ide/internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h index 0efb2da19b..03f14896d6 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -450,6 +450,7 @@ struct IDEBus { IDEDevice *slave; IDEState ifs[2]; int bus_id; + int max_units; IDEDMA *dma; uint8_t unit; uint8_t cmd; @@ -574,7 +575,7 @@ void ide_atapi_cmd(IDEState *s); void ide_atapi_cmd_reply_end(IDEState *s); /* hw/ide/qdev.c */ -void ide_bus_new(IDEBus *idebus, DeviceState *dev, int bus_id); +void ide_bus_new(IDEBus *idebus, DeviceState *dev, int bus_id, int max_units); IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive); #endif /* HW_IDE_INTERNAL_H */ |