735c6b
From 0c35c1c0495a953268719ad83cf2f368ab53018b Mon Sep 17 00:00:00 2001
735c6b
Message-Id: <0c35c1c0495a953268719ad83cf2f368ab53018b@dist-git>
735c6b
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
735c6b
Date: Fri, 20 Jan 2023 12:56:48 +0100
735c6b
Subject: [PATCH] conf: clarify some external TPM error messages
735c6b
MIME-Version: 1.0
735c6b
Content-Type: text/plain; charset=UTF-8
735c6b
Content-Transfer-Encoding: 8bit
735c6b
735c6b
Two of the messages referred to 'backend type' when dealing
735c6b
with the source type and one mentioned the 'client' attribute
735c6b
from an earlier iteration of the patches, even though the attribute
735c6b
was later changed to 'connect'.
735c6b
735c6b
https://bugzilla.redhat.com/show_bug.cgi?id=2063723
735c6b
735c6b
Signed-off-by: Ján Tomko <jtomko@redhat.com>
735c6b
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
735c6b
(cherry picked from commit 1c7476c8797b7f0d6e8d607f6a42c5bf43441677)
735c6b
Signed-off-by: Ján Tomko <jtomko@redhat.com>
735c6b
---
735c6b
 src/conf/domain_conf.c     | 4 ++--
735c6b
 src/conf/domain_validate.c | 2 +-
735c6b
 2 files changed, 3 insertions(+), 3 deletions(-)
735c6b
735c6b
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
735c6b
index 45965fa0fa..733399e6da 100644
735c6b
--- a/src/conf/domain_conf.c
735c6b
+++ b/src/conf/domain_conf.c
735c6b
@@ -10545,7 +10545,7 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt,
735c6b
     case VIR_DOMAIN_TPM_TYPE_EXTERNAL:
735c6b
         if (!(type = virXPathString("string(./backend/source/@type)", ctxt))) {
735c6b
             virReportError(VIR_ERR_XML_ERROR, "%s",
735c6b
-                           _("missing external TPM backend type"));
735c6b
+                           _("missing external TPM backend source type"));
735c6b
             goto error;
735c6b
         }
735c6b
 
735c6b
@@ -10555,7 +10555,7 @@ virDomainTPMDefParseXML(virDomainXMLOption *xmlopt,
735c6b
         def->data.external.source->type = virDomainChrTypeFromString(type);
735c6b
         if (def->data.external.source->type < 0) {
735c6b
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
735c6b
-                           _("unknown backend type '%s' for external TPM"),
735c6b
+                           _("unknown backend source type '%s' for external TPM"),
735c6b
                            type);
735c6b
             goto error;
735c6b
         }
735c6b
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
735c6b
index 39d924d4ed..1c13929281 100644
735c6b
--- a/src/conf/domain_validate.c
735c6b
+++ b/src/conf/domain_validate.c
735c6b
@@ -2757,7 +2757,7 @@ virDomainTPMDevValidate(const virDomainTPMDef *tpm)
735c6b
         }
735c6b
         if (tpm->data.external.source->data.nix.listen) {
735c6b
             virReportError(VIR_ERR_XML_ERROR, "%s",
735c6b
-                           _("only 'client' mode is supported for external TPM device"));
735c6b
+                           _("only 'connect' mode is supported for external TPM device"));
735c6b
             return -1;
735c6b
         }
735c6b
         if (tpm->data.external.source->data.nix.path == NULL) {
735c6b
-- 
735c6b
2.39.1
735c6b