[libvirt PATCH v3 3/4] virDomainGraphicsDefParseXMLSpice: Make name and mode mandatory

Tim Wiederhake twiederh at redhat.com
Wed May 5 10:55:47 UTC 2021


Attributes are mandatory and were incorrectly made optional recently.

Fixes: 2a5e16398eb622f30dabb16770d2e14b7a6d5212
Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e7823ec2df..3c12a94627 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12739,12 +12739,12 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def,
 
         if (virXMLPropEnum(node_list[i], "name",
                            virDomainGraphicsSpiceChannelNameTypeFromString,
-                           VIR_XML_PROP_NONE, &name) < 0)
+                           VIR_XML_PROP_REQUIRED, &name) < 0)
             return -1;
 
         if (virXMLPropEnum(node_list[i], "mode",
                            virDomainGraphicsSpiceChannelModeTypeFromString,
-                           VIR_XML_PROP_NONE, &mode) < 0)
+                           VIR_XML_PROP_REQUIRED, &mode) < 0)
             return -1;
 
         def->data.spice.channels[name] = mode;
-- 
2.26.3




More information about the libvir-list mailing list