mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: hotplug: Remove wrong check for empty disks
The check if the disk is empty is wrong and would spuriously reject NBD sources. Remove it.
This commit is contained in:
parent
a4bac46c96
commit
c01a2e057f
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user