[libvirt] [PATCH 03/17] qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch

John Ferlan jferlan at redhat.com
Tue Dec 5 01:38:53 UTC 2017


Make sure all types of virDomainControllerType are handled in the
switch statement.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_command.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5a6a671a1..818a057bc 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2695,7 +2695,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
         }
     }
 
-    switch (def->type) {
+    switch ((virDomainControllerType) def->type) {
     case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
         switch (model) {
         case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI:
@@ -3140,7 +3140,8 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
                              "this QEMU binary or machine type"));
         goto error;
 
-    default:
+    case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
+    case VIR_DOMAIN_CONTROLLER_TYPE_LAST:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Unsupported controller type: %s"),
                        virDomainControllerTypeToString(def->type));
-- 
2.13.6




More information about the libvir-list mailing list