mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: Move nvramTemplate parsing
It belongs to virDomainLoaderDefParseXMLNvram(), where the other parts of the <nvram> element are handled. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
cec35f4a52
commit
5943e4ade6
@ -17996,11 +17996,15 @@ static int
|
|||||||
virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
|
virDomainLoaderDefParseXMLNvram(virDomainLoaderDef *loader,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virDomainXMLOption *xmlopt,
|
virDomainXMLOption *xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags,
|
||||||
|
bool fwAutoSelect)
|
||||||
{
|
{
|
||||||
g_autofree char *nvramType = virXPathString("string(./os/nvram/@type)", ctxt);
|
g_autofree char *nvramType = virXPathString("string(./os/nvram/@type)", ctxt);
|
||||||
g_autoptr(virStorageSource) src = virStorageSourceNew();
|
g_autoptr(virStorageSource) src = virStorageSourceNew();
|
||||||
|
|
||||||
|
if (!fwAutoSelect)
|
||||||
|
loader->nvramTemplate = virXPathString("string(./os/nvram[1]/@template)", ctxt);
|
||||||
|
|
||||||
src->format = VIR_STORAGE_FILE_RAW;
|
src->format = VIR_STORAGE_FILE_RAW;
|
||||||
|
|
||||||
if (!nvramType) {
|
if (!nvramType) {
|
||||||
@ -18468,12 +18472,11 @@ virDomainDefParseBootLoaderOptions(virDomainDef *def,
|
|||||||
fwAutoSelect) < 0)
|
fwAutoSelect) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (virDomainLoaderDefParseXMLNvram(def->os.loader, ctxt, xmlopt, flags) < 0)
|
if (virDomainLoaderDefParseXMLNvram(def->os.loader,
|
||||||
|
ctxt, xmlopt, flags,
|
||||||
|
fwAutoSelect) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!fwAutoSelect)
|
|
||||||
def->os.loader->nvramTemplate = virXPathString("string(./os/nvram[1]/@template)", ctxt);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user