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:
parent
a6f7c1b04c
commit
cc9d272478
@ -2695,7 +2695,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (def->type) {
|
switch ((virDomainControllerType) def->type) {
|
||||||
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
|
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
|
||||||
switch (model) {
|
switch (model) {
|
||||||
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI:
|
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI:
|
||||||
@ -3140,7 +3140,8 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
|
|||||||
"this QEMU binary or machine type"));
|
"this QEMU binary or machine type"));
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
default:
|
case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
|
||||||
|
case VIR_DOMAIN_CONTROLLER_TYPE_LAST:
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("Unsupported controller type: %s"),
|
_("Unsupported controller type: %s"),
|
||||||
virDomainControllerTypeToString(def->type));
|
virDomainControllerTypeToString(def->type));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user