separate virDomainDefParseBootOptionsInfo from virDomainDefParseXML --- src/conf/domain_conf.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1a8248d..92a6522 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18169,8 +18169,7 @@ virDomainVcpuParse(virDomainDefPtr def, static int virDomainDefParseBootOptions(virDomainDefPtr def, - xmlXPathContextPtr ctxt, - virHashTablePtr *bootHash) + xmlXPathContextPtr ctxt) { xmlNodePtr *nodes = NULL; char *tmp = NULL; @@ -18302,8 +18301,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def, if (virDomainDefParseBootXML(ctxt, def) < 0) goto error; - if (!(*bootHash = virHashCreate(5, NULL))) - goto error; } ret = 0; @@ -19786,6 +19783,16 @@ virDomainDefParseClockInfo(virDomainParseTotalParamPtr param) return ret; } + +static int +virDomainDefParseBootOptionsInfo(virDomainParseTotalParamPtr param) +{ + if (virDomainDefParseBootOptions(param->def, param->ctxt) < 0) + return -1; + + return 0; +} + static virDomainDefPtr virDomainDefParseXML(xmlDocPtr xml, xmlNodePtr root, @@ -19844,6 +19851,7 @@ virDomainDefParseXML(xmlDocPtr xml, virDomainDefParsePMStateInfo, virDomainDefParsePerfEventInfo, virDomainDefParseClockInfo, + virDomainDefParseBootOptionsInfo, NULL }; @@ -19875,9 +19883,6 @@ virDomainDefParseXML(xmlDocPtr xml, fun_index++; } - if (virDomainDefParseBootOptions(def, ctxt, &bootHash) < 0) - goto error; - /* analysis of the disk devices */ if ((n = virXPathNodeSet("./devices/disk", ctxt, &nodes)) < 0) goto error; -- 2.8.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list