From: Andrea Bolognani Date: Fri, 28 Nov 2025 16:00:09 +0000 (+0100) Subject: qemu_firmware: Prefer template format to loader format X-Git-Tag: v12.0.0-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a92c1409568ac70bfa0a29099181452ef625d937;p=thirdparty%2Flibvirt.git qemu_firmware: Prefer template format to loader format In the vast majority of cases they will match, but it just makes more logical sense to copy the format from the NVRAM template to the NVRAM file itself. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index f32e46cc8c..b08fb95585 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -991,7 +991,10 @@ qemuFirmwareEnsureNVRAM(virDomainDef *def, * NVRAM format if that's missing though */ if (!virStorageSourceIsEmpty(loader->nvram)) { if (!loader->nvram->format) { - loader->nvram->format = loader->format; + if (loader->nvramTemplateFormat) + loader->nvram->format = loader->nvramTemplateFormat; + else + loader->nvram->format = loader->format; } return; }