mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
conf: rename struct field for NVRAM template
This is to make it explicit that the template only applies to the NVRAM store, not the main loader binary, even if the loader is writable. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
08101bde5d
commit
4e76dfd2e6
@ -3528,7 +3528,7 @@ virDomainLoaderDefFree(virDomainLoaderDef *loader)
|
|||||||
|
|
||||||
g_free(loader->path);
|
g_free(loader->path);
|
||||||
g_free(loader->nvram);
|
g_free(loader->nvram);
|
||||||
g_free(loader->templt);
|
g_free(loader->nvramTemplate);
|
||||||
g_free(loader);
|
g_free(loader);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18225,7 +18225,7 @@ virDomainDefParseBootLoaderOptions(virDomainDef *def,
|
|||||||
|
|
||||||
def->os.loader->nvram = virXPathString("string(./os/nvram[1])", ctxt);
|
def->os.loader->nvram = virXPathString("string(./os/nvram[1])", ctxt);
|
||||||
if (!fwAutoSelect)
|
if (!fwAutoSelect)
|
||||||
def->os.loader->templt = virXPathString("string(./os/nvram[1]/@template)", ctxt);
|
def->os.loader->nvramTemplate = virXPathString("string(./os/nvram[1]/@template)", ctxt);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -26912,9 +26912,9 @@ virDomainLoaderDefFormat(virBuffer *buf,
|
|||||||
else
|
else
|
||||||
virBufferAddLit(buf, "/>\n");
|
virBufferAddLit(buf, "/>\n");
|
||||||
|
|
||||||
if (loader->nvram || loader->templt) {
|
if (loader->nvram || loader->nvramTemplate) {
|
||||||
virBufferAddLit(buf, "<nvram");
|
virBufferAddLit(buf, "<nvram");
|
||||||
virBufferEscapeString(buf, " template='%s'", loader->templt);
|
virBufferEscapeString(buf, " template='%s'", loader->nvramTemplate);
|
||||||
if (loader->nvram)
|
if (loader->nvram)
|
||||||
virBufferEscapeString(buf, ">%s</nvram>\n", loader->nvram);
|
virBufferEscapeString(buf, ">%s</nvram>\n", loader->nvram);
|
||||||
else
|
else
|
||||||
|
@ -2220,7 +2220,7 @@ struct _virDomainLoaderDef {
|
|||||||
virDomainLoader type;
|
virDomainLoader type;
|
||||||
virTristateBool secure;
|
virTristateBool secure;
|
||||||
char *nvram; /* path to non-volatile RAM */
|
char *nvram; /* path to non-volatile RAM */
|
||||||
char *templt; /* user override of path to master nvram */
|
char *nvramTemplate; /* user override of path to master nvram */
|
||||||
};
|
};
|
||||||
|
|
||||||
void virDomainLoaderDefFree(virDomainLoaderDef *loader);
|
void virDomainLoaderDefFree(virDomainLoaderDef *loader);
|
||||||
|
@ -1136,14 +1136,14 @@ qemuFirmwareEnableFeatures(virQEMUDriver *driver,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_FREE(def->os.loader->templt);
|
VIR_FREE(def->os.loader->nvramTemplate);
|
||||||
def->os.loader->templt = g_strdup(flash->nvram_template.filename);
|
def->os.loader->nvramTemplate = g_strdup(flash->nvram_template.filename);
|
||||||
|
|
||||||
qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram);
|
qemuDomainNVRAMPathFormat(cfg, def, &def->os.loader->nvram);
|
||||||
|
|
||||||
VIR_DEBUG("decided on firmware '%s' template '%s' NVRAM '%s'",
|
VIR_DEBUG("decided on firmware '%s' template '%s' NVRAM '%s'",
|
||||||
def->os.loader->path,
|
def->os.loader->path,
|
||||||
def->os.loader->templt,
|
def->os.loader->nvramTemplate,
|
||||||
def->os.loader->nvram);
|
def->os.loader->nvram);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1310,7 +1310,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
|
|||||||
* its path in domain XML) but no template for NVRAM was
|
* its path in domain XML) but no template for NVRAM was
|
||||||
* specified and the varstore doesn't exist ... */
|
* specified and the varstore doesn't exist ... */
|
||||||
if (!virDomainDefHasOldStyleROUEFI(def) ||
|
if (!virDomainDefHasOldStyleROUEFI(def) ||
|
||||||
def->os.loader->templt ||
|
def->os.loader->nvramTemplate ||
|
||||||
(!reset_nvram && virFileExists(def->os.loader->nvram)))
|
(!reset_nvram && virFileExists(def->os.loader->nvram)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -4478,8 +4478,8 @@ qemuPrepareNVRAM(virQEMUDriver *driver,
|
|||||||
(virFileExists(loader->nvram) && !reset_nvram))
|
(virFileExists(loader->nvram) && !reset_nvram))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
master_nvram_path = loader->templt;
|
master_nvram_path = loader->nvramTemplate;
|
||||||
if (!loader->templt) {
|
if (!loader->nvramTemplate) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < cfg->nfirmwares; i++) {
|
for (i = 0; i < cfg->nfirmwares; i++) {
|
||||||
if (STREQ(cfg->firmwares[i]->name, loader->path)) {
|
if (STREQ(cfg->firmwares[i]->name, loader->path)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user