render / rpms / libvirt

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