On 12/15/22 14:56, Ján Tomko wrote:
Introduce a new backend type 'external' for connecting to a
swtpm daemon
not managed by libvirtd.
Mostly in one commit, thanks to -Wswitch
This is true.
and the way we generate capabilities.
But I'm failing to see why capabilities had to be in the same commit.
Because of xml2xml test case? I don't mind, just asking.
https://bugzilla.redhat.com/show_bug.cgi?id=2063723
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
61 files changed, 199 insertions(+), 2 deletions(-)
Some long lines, please squash this in:
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c1e6732cde..6c088ff295 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10367,8 +10367,8 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt,
goto error;
}
- if (virDomainChrSourceDefParseXML(def->data.external.source, backends[0],
- flags, NULL, ctxt) < 0)
+ if (virDomainChrSourceDefParseXML(def->data.external.source,
+ backends[0], flags, NULL, ctxt) < 0)
goto error;
break;
case VIR_DOMAIN_TPM_TYPE_LAST:
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 8a9a79d7ea..2c63a0b343 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -2731,15 +2731,18 @@ virDomainTPMDevValidate(const virDomainTPMDef *tpm)
case VIR_DOMAIN_TPM_TYPE_EXTERNAL:
if (tpm->data.external.source->type != VIR_DOMAIN_CHR_TYPE_UNIX) {
- virReportError(VIR_ERR_XML_ERROR, "%s", _("only source type
'unix' is supported for external TPM device"));
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("only source type 'unix' is supported for
external TPM device"));
return -1;
}
if (tpm->data.external.source->data.nix.listen) {
- virReportError(VIR_ERR_XML_ERROR, "%s", _("only
'client' mode is supported for external TPM device"));
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("only 'client' mode is supported for external
TPM device"));
return -1;
}
if (tpm->data.external.source->data.nix.path == NULL) {
- virReportError(VIR_ERR_XML_ERROR, "%s", _("missing socket path
for external TPM device"));
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("missing socket path for external TPM device"));
return -1;
}
case VIR_DOMAIN_TPM_TYPE_LAST:
Michal