[PATCH 10/13] qemuFirmwareMatchDomain: Don't base firmware selection on nvram image format

Peter Krempa posted 13 patches 2 weeks, 2 days ago
[PATCH 10/13] qemuFirmwareMatchDomain: Don't base firmware selection on nvram image format
Posted by Peter Krempa 2 weeks, 2 days ago
Basing the selection on the format of the actual NVRAM image makes no
sense as user may format the image themselves.

Additionally it doesn't make much sense to even limit the firmware
selection based on the nvram template itself. As format of the template
is given and firmware images don't really provide any choice.

Remove the limitation so that autoselection can pick a template
regardless of the selected format or template format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_firmware.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index d9d21b4771..2d0ec0b4fa 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -1332,13 +1332,6 @@ qemuFirmwareMatchDomain(const virDomainDef *def,
                           flash->nvram_template.format);
                 return false;
             }
-            if (loader && loader->nvram && loader->nvram->format &&
-                STRNEQ(flash->nvram_template.format, virStorageFileFormatTypeToString(loader->nvram->format))) {
-                VIR_DEBUG("Discarding loader with mismatching nvram template format '%s' != '%s'",
-                          flash->nvram_template.format,
-                          virStorageFileFormatTypeToString(loader->nvram->format));
-                return false;
-            }
         }
     } else if (fw->mapping.device == QEMU_FIRMWARE_DEVICE_MEMORY) {
         if (loader && loader->type &&
-- 
2.47.0