[PATCH merged] bhyveBuildControllerArgStr: Fill in missing cases to switch() statement

Michal Privoznik posted 1 patch 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/47230842aa6bca1da75cc92c50144f223d1ad1d3.1694777461.git.mprivozn@redhat.com
src/bhyve/bhyve_command.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
[PATCH merged] bhyveBuildControllerArgStr: Fill in missing cases to switch() statement
Posted by Michal Privoznik 9 months ago
When making 'type' member of virDomainControllerDef to be of
virDomainControllerType rather than an int I forgot to update
bhyve_command.c.

Fixes: 27a653b8931051991d44b8776a8cdc08c666b729
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed as build breaker fix.

 src/bhyve/bhyve_command.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 82e7e96816..bcef836eca 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -367,6 +367,18 @@ bhyveBuildControllerArgStr(const virDomainDef *def,
         virCommandAddArgFormat(cmd, "%d:0,lpc",
                                 controller->info.addr.pci.slot);
         break;
+    case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
+    case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
+    case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
+    case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL:
+    case VIR_DOMAIN_CONTROLLER_TYPE_CCID:
+    case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS:
+    case VIR_DOMAIN_CONTROLLER_TYPE_LAST:
+    default:
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("unsupported controller device"));
+        return -1;
+
     }
     return 0;
 }
-- 
2.41.0