]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix return value for qemuFirmwareFillDomainLegacy()
authorAndrea Bolognani <abologna@redhat.com>
Wed, 2 Aug 2023 15:18:32 +0000 (17:18 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 21 Aug 2023 11:51:19 +0000 (13:51 +0200)
The documentation states that, just like the Modern() variant,
this function should return 1 if a match wasn't found. It
currently doesn't do that, and returns 0 instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_firmware.c

index cf9a45dc39f5485c305c6f668c851cfb97839f4c..5f030ebce4a9b30ea1c607ac889b4460b59cfe3c 100644 (file)
@@ -1575,17 +1575,17 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver,
     size_t i;
 
     if (!loader)
-        return 0;
+        return 1;
 
     if (loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH) {
         VIR_DEBUG("Ignoring legacy entries for '%s' loader",
                   virDomainLoaderTypeToString(loader->type));
-        return 0;
+        return 1;
     }
 
     if (loader->stateless == VIR_TRISTATE_BOOL_YES) {
         VIR_DEBUG("Ignoring legacy entries for stateless loader");
-        return 0;
+        return 1;
     }
 
     if (loader->format != VIR_STORAGE_FILE_RAW) {