mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
conf: Handle NVRAM in virDomainLoaderDefParseXML()
All the data in the <nvram> element ends up in the same struct as that coming from the <loader> element, so it makes sense to have a single entry point for parsing an XML document into a virDomainLoaderDef instance. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5943e4ade6
commit
28c689dc61
@ -18042,8 +18042,11 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
|
||||
|
||||
|
||||
static int
|
||||
virDomainLoaderDefParseXML(xmlNodePtr node,
|
||||
virDomainLoaderDef *loader,
|
||||
virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
|
||||
xmlNodePtr node,
|
||||
xmlXPathContextPtr ctxt,
|
||||
virDomainXMLOption *xmlopt,
|
||||
unsigned int flags,
|
||||
bool fwAutoSelect)
|
||||
{
|
||||
if (!fwAutoSelect) {
|
||||
@ -18066,6 +18069,11 @@ virDomainLoaderDefParseXML(xmlNodePtr node,
|
||||
&loader->secure) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainLoaderDefParseXMLNvram(loader,
|
||||
ctxt, xmlopt, flags,
|
||||
fwAutoSelect) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -18467,16 +18475,12 @@ virDomainDefParseBootLoaderOptions(virDomainDef *def,
|
||||
|
||||
def->os.loader = g_new0(virDomainLoaderDef, 1);
|
||||
|
||||
if (virDomainLoaderDefParseXML(loader_node,
|
||||
def->os.loader,
|
||||
if (virDomainLoaderDefParseXML(def->os.loader,
|
||||
loader_node,
|
||||
ctxt, xmlopt, flags,
|
||||
fwAutoSelect) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainLoaderDefParseXMLNvram(def->os.loader,
|
||||
ctxt, xmlopt, flags,
|
||||
fwAutoSelect) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user