On Wed, Apr 29, 2026 at 22:09:34 +0530, Srihari Parimi wrote:
Hi Peter,
Hi; please don't top-post on technical lists.
Thank you for your comments. A question 1. Here is one code snippet where you indicated the Formatting is broken. If I understood correctly, I must not call virReportError() - but simply
No error reports here are actually needed. Callers of this function expect errors to be set ... It's just that the error message is mis-aligned ...
goto the cleanup like the last condition where you seem to be fine ?
__start
if (def->ntpms > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("VMware only supports a single TPM device"));
The above should look like: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("VMware only supports a single TPM device"));
goto cleanup; }
if (virtualHW_version < 14) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vTPM requires virtual hardware version 14 or higher"));
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vTPM requires virtual hardware version 14 or higher"));
goto cleanup; }
if (def->os.firmware != VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vTPM requires EFI firmware"));
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vTPM requires EFI firmware"));
goto cleanup; }
__end