From 1fefaa42f98530ed449ea9aa4863c4c1bc5327b5 Mon Sep 17 00:00:00 2001 Message-ID: <1fefaa42f98530ed449ea9aa4863c4c1bc5327b5.1692951632.git.jdenemar@redhat.com> From: Andrea Bolognani Date: Wed, 2 Aug 2023 17:18:32 +0200 Subject: [PATCH] qemu: Fix return value for qemuFirmwareFillDomainLegacy() 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 Reviewed-by: Michal Privoznik (cherry picked from commit d917883b30f1d33f1df78394152e67b402b9c72e) https://bugzilla.redhat.com/show_bug.cgi?id=2196178 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index cf9a45dc39..5f030ebce4 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -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) { -- 2.42.0