mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu_firmware: Drop fallback for absent nvramTemplateFormat
If this information is missing, the parsing code will consider the firmware descriptor to be invalid and matching against it will not even be attempted. So we can safely drop this redundant fallback. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
1 parent
3463e543fe
commit
876a5d34d4
1 file changed
+1
-7
@@ -1421,14 +1421,8 @@ qemuFirmwareEnableFeaturesModern(virDomainDef *def,
|
||||
loader->nvramTemplateFormat = VIR_STORAGE_FILE_NONE;
|
||||
|
||||
if (!loader->nvram || virStorageSourceIsLocalStorage(loader->nvram)) {
|
||||
/* validation when parsing the JSON files ensures that we get
|
||||
* only 'raw' and 'qcow2' here. Fall back to sharing format with loader */
|
||||
if (flash->nvram_template.format)
|
||||
loader->nvramTemplateFormat = virStorageFileFormatTypeFromString(flash->nvram_template.format);
|
||||
else
|
||||
loader->nvramTemplateFormat = loader->format;
|
||||
|
||||
loader->nvramTemplate = g_strdup(flash->nvram_template.filename);
|
||||
loader->nvramTemplateFormat = virStorageFileFormatTypeFromString(flash->nvram_template.format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user