From b61ae99b6dd84d6c3b60816cd0979d08e524ae46 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Fri, 8 Dec 2017 13:34:53 -0500 Subject: [PATCH] qemu: Adjust SCSI controller switch in qemuBuildControllerDevStr Modify the SCSI controller switch during command line building to account for all virDomainControllerModelSCSI types rather than using the default label. --- src/qemu/qemu_command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 410f93fbda..8227b9a652 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2660,7 +2660,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, switch ((virDomainControllerType) def->type) { case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: - switch (def->model) { + switch ((virDomainControllerModelSCSI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: if (def->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { virBufferAddLit(&buf, "virtio-scsi-ccw"); @@ -2700,7 +2700,10 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078: virBufferAddLit(&buf, "megasas"); break; - default: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported controller model: %s"), virDomainControllerModelSCSITypeToString(def->model)); -- GitLab