aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2009-12-07 20:51:49 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-18 11:26:33 -0600
commitec7efac4a967c650ae1cd8cebe28e7c69cbe3864 (patch)
tree048e468d40420f82f37e5fcf40cae7a084788b16
parent47f5ba724871622c7db7a73fd05d6b3646478dd6 (diff)
downloadqemu-ec7efac4a967c650ae1cd8cebe28e7c69cbe3864.zip
qemu-ec7efac4a967c650ae1cd8cebe28e7c69cbe3864.tar.gz
qemu-ec7efac4a967c650ae1cd8cebe28e7c69cbe3864.tar.bz2
Fix backcompat for hotplug of SCSI controllers
SCSI controllers have no trouble existing without any attached disks. This could be achieved with the (legacy) monitor syntax pci_add pci_addr=auto storage if=scsi This is now denied with scsi requires a backing file/device. failed to add if=scsi There is no need for this denial and it breaks compatability with existing QEMU usage, so remove the check for presence of a drive. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/pci-hotplug.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index f10c868..ba13d2b 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -199,14 +199,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
switch (type) {
case IF_SCSI:
- if (!dinfo) {
- monitor_printf(mon, "scsi requires a backing file/device.\n");
- return NULL;
- }
dev = pci_create(bus, devfn, "lsi53c895a");
if (qdev_init(&dev->qdev) < 0)
dev = NULL;
- if (dev) {
+ if (dev && dinfo) {
if (scsi_hot_add(&dev->qdev, dinfo, 0) != 0) {
qdev_unplug(&dev->qdev);
dev = NULL;