conf: Rename virDomainLoaderDefParseXML() argument

We're going to start passing multiple nodes to the function in
a moment, so we need a more specific name.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2022-06-17 10:36:01 +02:00
parent 28c689dc61
commit f0e68d28e1

View File

@ -18043,29 +18043,29 @@ virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
static int static int
virDomainLoaderDefParseXML(virDomainLoaderDef *loader, virDomainLoaderDefParseXML(virDomainLoaderDef *loader,
xmlNodePtr node, xmlNodePtr loaderNode,
xmlXPathContextPtr ctxt, xmlXPathContextPtr ctxt,
virDomainXMLOption *xmlopt, virDomainXMLOption *xmlopt,
unsigned int flags, unsigned int flags,
bool fwAutoSelect) bool fwAutoSelect)
{ {
if (!fwAutoSelect) { if (!fwAutoSelect) {
if (virXMLPropTristateBool(node, "readonly", VIR_XML_PROP_NONE, if (virXMLPropTristateBool(loaderNode, "readonly", VIR_XML_PROP_NONE,
&loader->readonly) < 0) &loader->readonly) < 0)
return -1; return -1;
if (virXMLPropEnum(node, "type", virDomainLoaderTypeFromString, if (virXMLPropEnum(loaderNode, "type", virDomainLoaderTypeFromString,
VIR_XML_PROP_NONZERO, &loader->type) < 0) VIR_XML_PROP_NONZERO, &loader->type) < 0)
return -1; return -1;
if (!(loader->path = virXMLNodeContentString(node))) if (!(loader->path = virXMLNodeContentString(loaderNode)))
return -1; return -1;
if (STREQ(loader->path, "")) if (STREQ(loader->path, ""))
VIR_FREE(loader->path); VIR_FREE(loader->path);
} }
if (virXMLPropTristateBool(node, "secure", VIR_XML_PROP_NONE, if (virXMLPropTristateBool(loaderNode, "secure", VIR_XML_PROP_NONE,
&loader->secure) < 0) &loader->secure) < 0)
return -1; return -1;
@ -18467,16 +18467,16 @@ virDomainDefParseBootLoaderOptions(virDomainDef *def,
virDomainXMLOption *xmlopt, virDomainXMLOption *xmlopt,
unsigned int flags) unsigned int flags)
{ {
xmlNodePtr loader_node = virXPathNode("./os/loader[1]", ctxt); xmlNodePtr loaderNode = virXPathNode("./os/loader[1]", ctxt);
const bool fwAutoSelect = def->os.firmware != VIR_DOMAIN_OS_DEF_FIRMWARE_NONE; const bool fwAutoSelect = def->os.firmware != VIR_DOMAIN_OS_DEF_FIRMWARE_NONE;
if (!loader_node) if (!loaderNode)
return 0; return 0;
def->os.loader = g_new0(virDomainLoaderDef, 1); def->os.loader = g_new0(virDomainLoaderDef, 1);
if (virDomainLoaderDefParseXML(def->os.loader, if (virDomainLoaderDefParseXML(def->os.loader,
loader_node, loaderNode,
ctxt, xmlopt, flags, ctxt, xmlopt, flags,
fwAutoSelect) < 0) fwAutoSelect) < 0)
return -1; return -1;