From: Andrea Bolognani Date: Mon, 24 Nov 2025 16:57:25 +0000 (+0100) Subject: qemu_firmware: Drop fallback for absent nvramTemplateFormat X-Git-Tag: v12.0.0-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876a5d34d45afd71f509c971e37bdb45ceb8cc28;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 47a3987b64..9dff3828a2 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -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); } }