On 12/04/2012 10:29 AM, Osier Yang wrote:
s/codes/code/ in the subject
"disk" is initialized to "dev->data.disk" in
the beginning of the
function.
---
src/qemu/qemu_driver.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
ACK.
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2c36935..a7ef4a2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6154,9 +6154,8 @@ qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
case VIR_DOMAIN_DISK_DEVICE_LUN:
if (disk->bus == VIR_DOMAIN_DISK_BUS_VIRTIO)
ret = qemuDomainDetachPciDiskDevice(driver, vm, dev);
- else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI)
- ret = qemuDomainDetachDiskDevice(driver, vm, dev);
- else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB)
+ else if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI ||
+ disk->bus == VIR_DOMAIN_DISK_BUS_USB)
ret = qemuDomainDetachDiskDevice(driver, vm, dev);
else
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org