separate virDomainDefParseKeyWrapInfo from virDomainDefParseXML --- src/conf/domain_conf.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a8fc27c..03bf5ad 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21024,6 +21024,16 @@ virDomainDefParseSysinfoInfo(virDomainParseTotalParamPtr param) } +static int +virDomainDefParseKeyWrapInfo(virDomainParseTotalParamPtr param) +{ + if (virDomainKeyWrapDefParseXML(param->def, param->ctxt) < 0) + return -1; + + return 0; +} + + static virDomainDefPtr virDomainDefParseXML(xmlDocPtr xml, xmlNodePtr root, @@ -21079,6 +21089,7 @@ virDomainDefParseXML(xmlDocPtr xml, virDomainDefParseDeviceInfo, virDomainDefParseIdmapInfo, virDomainDefParseSysinfoInfo, + virDomainDefParseKeyWrapInfo, NULL }; @@ -21110,9 +21121,6 @@ virDomainDefParseXML(xmlDocPtr xml, fun_index++; } - if (virDomainKeyWrapDefParseXML(def, ctxt) < 0) - goto error; - /* Extract custom metadata */ if ((node = virXPathNode("./metadata[1]", ctxt)) != NULL) def->metadata = xmlCopyNode(node, 1); -- 2.8.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list