mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: hotplug: Use typecasted switch
Remove the default case since all cases are covered.
This commit is contained in:
parent
986831a8d4
commit
f8fee9337b
@ -795,7 +795,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
if (qemuDomainDetermineDiskChain(driver, vm, disk, false, true) < 0)
|
||||
goto end;
|
||||
|
||||
switch (disk->device) {
|
||||
switch ((virDomainDiskDevice) disk->device) {
|
||||
case VIR_DOMAIN_DISK_DEVICE_CDROM:
|
||||
case VIR_DOMAIN_DISK_DEVICE_FLOPPY:
|
||||
if (!(orig_disk = virDomainDiskFindByBusAndDst(vm->def,
|
||||
@ -837,10 +837,8 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
virDomainDiskBusTypeToString(disk->bus));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("disk device type '%s' cannot be hotplugged"),
|
||||
virDomainDiskDeviceTypeToString(disk->device));
|
||||
|
||||
case VIR_DOMAIN_DISK_DEVICE_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user