separate virDomainDefParseNameSpaceInfo from virDomainDefParseXML
---
src/conf/domain_conf.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7006e7f..7caff3a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21045,6 +21045,25 @@ virDomainDefParseMetadataInfo(virDomainParseTotalParamPtr param)
return 0;
}
+
+static int
+virDomainDefParseNameSpaceInfo(virDomainParseTotalParamPtr param)
+{
+ /* we have to make a copy of all of the callback pointers here since
+ * we won't have the virCaps structure available during free
+ */
+ param->def->ns = param->xmlopt->ns;
+
+ if (param->def->ns.parse &&
+ (param->def->ns.parse)(param->xml,
+ param->root,
+ param->ctxt,
+ ¶m->def->namespaceData) < 0)
+ return -1;
+
+ return 0;
+}
+
static virDomainDefPtr
virDomainDefParseXML(xmlDocPtr xml,
xmlNodePtr root,
@@ -21100,6 +21119,7 @@ virDomainDefParseXML(xmlDocPtr xml,
virDomainDefParseSysinfoInfo,
virDomainDefParseKeyWrapInfo,
virDomainDefParseMetadataInfo,
+ virDomainDefParseNameSpaceInfo,
NULL
};
@@ -21131,15 +21151,6 @@ virDomainDefParseXML(xmlDocPtr xml,
fun_index++;
}
- /* we have to make a copy of all of the callback pointers here since
- * we won't have the virCaps structure available during free
- */
- def->ns = xmlopt->ns;
-
- if (def->ns.parse &&
- (def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0)
- goto error;
-
/* callback to fill driver specific domain aspects */
if (virDomainDefPostParseInternal(def, caps, flags, xmlopt, parseOpaque,
bootHash) < 0)
--
2.8.3