The function reports libvirt errors so stick with the usual '0' and '-1' return values. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_validate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 8ac3e65e9d..2185e31a27 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3599,19 +3599,19 @@ qemuValidateDomainDeviceDefControllerIDE(const virDomainControllerDef *controlle * Returns true if either supported or there are no iothreads for controller; * otherwise, returns false if configuration is not quite right. */ -static bool +static int qemuValidateCheckSCSIControllerIOThreads(const virDomainControllerDef *controller, const virDomainDef *def) { if (!controller->iothread) - return true; + return 0; if (controller->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && controller->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && controller->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("virtio-scsi IOThreads only available for virtio pci and virtio ccw controllers")); - return false; + return -1; } /* Can we find the controller iothread in the iothreadid list? */ @@ -3619,10 +3619,10 @@ qemuValidateCheckSCSIControllerIOThreads(const virDomainControllerDef *controlle virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("controller iothread '%1$u' not defined in iothreadid"), controller->iothread); - return false; + return -1; } - return true; + return 0; } @@ -3634,7 +3634,7 @@ qemuValidateDomainDeviceDefControllerSCSI(const virDomainControllerDef *controll case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: - if (!qemuValidateCheckSCSIControllerIOThreads(controller, def)) + if (qemuValidateCheckSCSIControllerIOThreads(controller, def) < 0) return -1; break; -- 2.48.1