1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch

Make sure all types of virDomainControllerType are handled in the
switch statement.
This commit is contained in:
John Ferlan 2017-12-01 08:51:05 -05:00
parent a6f7c1b04c
commit cc9d272478

View File

@ -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));