Commit 98c5c53d69b partially reverted the effort to use typecasted enums for compiler notification. Turn it back. --- src/qemu/qemu_command.c | 4 +++- src/qemu/qemu_hotplug.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9597b30..b924917 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4281,7 +4281,9 @@ qemuBuildPCIHostdevDevStr(const virDomainDef *def, virBufferAddLit(&buf, "vfio-pci"); break; - default: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("invalid PCI passthrough type '%s'"), virDomainHostdevSubsysPCIBackendTypeToString(backend)); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index ef8696b..4ff10b4 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1234,7 +1234,16 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver, } break; - default: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM: + break; + + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN: + case VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("QEMU does not support device assignment mode '%s'"), + virDomainHostdevSubsysPCIBackendTypeToString(backend)); + goto error; break; } -- 2.8.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list