mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
qemu: Convert qemuDomainDetachDeviceConfig to typecasted enum
This commit is contained in:
parent
2536b1b952
commit
fa3701a94c
@ -7205,7 +7205,7 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
|
||||
virDomainFSDefPtr fs;
|
||||
int idx;
|
||||
|
||||
switch (dev->type) {
|
||||
switch ((virDomainDeviceType) dev->type) {
|
||||
case VIR_DOMAIN_DEVICE_DISK:
|
||||
disk = dev->data.disk;
|
||||
if (!(det_disk = virDomainDiskRemoveByName(vmdef, disk->dst))) {
|
||||
@ -7283,7 +7283,20 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
|
||||
virDomainFSDefFree(fs);
|
||||
break;
|
||||
|
||||
default:
|
||||
case VIR_DOMAIN_DEVICE_INPUT:
|
||||
case VIR_DOMAIN_DEVICE_SOUND:
|
||||
case VIR_DOMAIN_DEVICE_VIDEO:
|
||||
case VIR_DOMAIN_DEVICE_WATCHDOG:
|
||||
case VIR_DOMAIN_DEVICE_GRAPHICS:
|
||||
case VIR_DOMAIN_DEVICE_HUB:
|
||||
case VIR_DOMAIN_DEVICE_SMARTCARD:
|
||||
case VIR_DOMAIN_DEVICE_MEMBALLOON:
|
||||
case VIR_DOMAIN_DEVICE_NVRAM:
|
||||
case VIR_DOMAIN_DEVICE_RNG:
|
||||
case VIR_DOMAIN_DEVICE_SHMEM:
|
||||
case VIR_DOMAIN_DEVICE_REDIRDEV:
|
||||
case VIR_DOMAIN_DEVICE_NONE:
|
||||
case VIR_DOMAIN_DEVICE_LAST:
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("persistent detach of device '%s' is not supported"),
|
||||
virDomainDeviceTypeToString(dev->type));
|
||||
|
Loading…
Reference in New Issue
Block a user