mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
conf: Introduce virDomainLoaderDefParseXMLLoader()
We already handle the <nvram> element in a separate helper, which is cleaner than having all the logic in the top-level virDomainLoaderDefParseXML() function. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
79e7d2c602
commit
c6bff86ae1
@ -16795,19 +16795,9 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
|
||||
|
||||
|
||||
static int
|
||||
virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
|
||||
xmlNodePtr loaderNode,
|
||||
xmlNodePtr nvramNode,
|
||||
xmlNodePtr nvramSourceNode,
|
||||
xmlXPathContextPtr ctxt,
|
||||
virDomainXMLOption *xmlopt,
|
||||
unsigned int flags)
|
||||
virDomainLoaderDefParseXMLLoader(virDomainLoaderDef *loader,
|
||||
xmlNodePtr loaderNode)
|
||||
{
|
||||
if (virDomainLoaderDefParseXMLNvram(loader,
|
||||
nvramNode, nvramSourceNode,
|
||||
ctxt, xmlopt, flags) < 0)
|
||||
return -1;
|
||||
|
||||
if (!loaderNode)
|
||||
return 0;
|
||||
|
||||
@ -16837,6 +16827,28 @@ virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
|
||||
xmlNodePtr loaderNode,
|
||||
xmlNodePtr nvramNode,
|
||||
xmlNodePtr nvramSourceNode,
|
||||
xmlXPathContextPtr ctxt,
|
||||
virDomainXMLOption *xmlopt,
|
||||
unsigned int flags)
|
||||
{
|
||||
if (virDomainLoaderDefParseXMLNvram(loader,
|
||||
nvramNode, nvramSourceNode,
|
||||
ctxt, xmlopt, flags) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainLoaderDefParseXMLLoader(loader,
|
||||
loaderNode) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainSchedulerParseCommonAttrs(xmlNodePtr node,
|
||||
virProcessSchedPolicy *policy,
|
||||
|
Loading…
x
Reference in New Issue
Block a user