[PATCH 2/6] qemu: hotplug: Remove wrong check for empty disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The check if the disk is empty is wrong and would spuriously reject NBD
sources. Remove it.
---
 src/qemu/qemu_hotplug.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 1a0844701..6bec69a5d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -766,7 +766,6 @@ qemuDomainAttachUSBMassStorageDevice(virQEMUDriverPtr driver,
     char *devstr = NULL;
     bool driveAdded = false;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
-    const char *src = virDomainDiskGetSource(disk);
     bool releaseaddr = false;

     if (priv->usbaddrs) {
@@ -778,13 +777,6 @@ qemuDomainAttachUSBMassStorageDevice(virQEMUDriverPtr driver,
     if (qemuDomainPrepareDisk(driver, vm, disk, NULL, false) < 0)
         goto cleanup;

-    /* XXX not correct once we allow attaching a USB CDROM */
-    if (!src) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("disk source path is missing"));
-        goto error;
-    }
-
     if (qemuAssignDeviceDiskAlias(vm->def, disk, priv->qemuCaps) < 0)
         goto error;

-- 
2.14.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux