40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From 8c34553e1e77dcea4f86ee2c2668de251876b42e Mon Sep 17 00:00:00 2001
|
|
Message-ID: <8c34553e1e77dcea4f86ee2c2668de251876b42e.1772815313.git.jdenemar@redhat.com>
|
|
From: Andrea Bolognani <abologna@redhat.com>
|
|
Date: Fri, 28 Nov 2025 17:00:09 +0100
|
|
Subject: [PATCH] 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 <abologna@redhat.com>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
(cherry picked from commit a92c1409568ac70bfa0a29099181452ef625d937)
|
|
|
|
https://issues.redhat.com/browse/RHEL-82645
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
---
|
|
src/qemu/qemu_firmware.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
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;
|
|
}
|
|
--
|
|
2.53.0
|