mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 02:04:16 +03:00
qemu: Always assume QEMU_CAPS_USB_STORAGE_REMOVABLE
Introduced in QEMU commit of v0.14.0-rc0~83^2~1 and not being able to compile the .removable attribute of the "usb-storage" object out, renders our corresponding capability QEMU_CAPS_USB_STORAGE_REMOVABLE always set. Stop using it in command generation / domain validation. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d90a34cf29
commit
1a663b53c0
@ -1842,12 +1842,10 @@ qemuBuildDiskDeviceProps(const virDomainDef *def,
|
||||
case VIR_DOMAIN_DISK_BUS_USB:
|
||||
driver = "usb-storage";
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_REMOVABLE)) {
|
||||
if (disk->removable == VIR_TRISTATE_SWITCH_ABSENT)
|
||||
removable = VIR_TRISTATE_SWITCH_OFF;
|
||||
else
|
||||
removable = disk->removable;
|
||||
}
|
||||
if (disk->removable == VIR_TRISTATE_SWITCH_ABSENT)
|
||||
removable = VIR_TRISTATE_SWITCH_OFF;
|
||||
else
|
||||
removable = disk->removable;
|
||||
|
||||
break;
|
||||
|
||||
|
@ -3006,14 +3006,6 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (disk->removable != VIR_TRISTATE_SWITCH_ABSENT &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_REMOVABLE)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("This QEMU doesn't support setting the "
|
||||
"removable flag of USB storage devices"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DISK_BUS_XEN:
|
||||
|
Loading…
x
Reference in New Issue
Block a user