Rearrange to suppress gcc 3.3.5 warning about unused variable
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
9c9c310a54
commit
7432ff5d6b
|
@ -125,9 +125,8 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
|
||||||
monitor_printf(mon, "Parameter addr not supported\n");
|
monitor_printf(mon, "Parameter addr not supported\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else if (type == IF_VIRTIO) {
|
} else {
|
||||||
monitor_printf(mon, "virtio requires a backing file/device.\n");
|
dinfo = NULL;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -135,6 +134,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
|
||||||
dev = pci_create("lsi53c895a", devaddr);
|
dev = pci_create("lsi53c895a", devaddr);
|
||||||
break;
|
break;
|
||||||
case IF_VIRTIO:
|
case IF_VIRTIO:
|
||||||
|
if (!dinfo) {
|
||||||
|
monitor_printf(mon, "virtio requires a backing file/device.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
dev = pci_create("virtio-blk-pci", devaddr);
|
dev = pci_create("virtio-blk-pci", devaddr);
|
||||||
qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
|
qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue