]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Improve error message for failed firmware autoselection
authorAndrea Bolognani <abologna@redhat.com>
Fri, 22 Sep 2023 13:19:46 +0000 (15:19 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 22 Sep 2023 13:50:35 +0000 (15:50 +0200)
The current message can be misleading, because it seems to suggest
that no firmware of the requested type is available on the system.

What actually happens most of the time, however, is that despite
having multiple firmwares of the right type to choose from, none
of them is suitable because of lacking some specific feature or
being incompatible with some setting that the user has explicitly
enabled.

Providing an error message that describes exactly the problem is
not feasible, since we would have to list each candidate along
with the reason why we rejected it, which would get out of hand
quickly.

As a small but hopefully helpful improvement over the current
situation, reword the error message to make it clearer that the
culprit is not necessarily the firmware type, but rather the
overall domain configuration.

Suggested-by: Michael Kjörling <7d1340278307@ewoof.net>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_firmware.c
tests/qemuxml2argvdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err
tests/qemuxml2argvdata/firmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err
tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err
tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err

index 3dcd139a478163ebeef512c16ce377b2bf2c5760..d39e61d07112b0f455e620008c31f3c305ca520f 100644 (file)
@@ -1854,7 +1854,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
             }
         } else {
             virReportError(VIR_ERR_OPERATION_FAILED,
-                           _("Unable to find any firmware to satisfy '%1$s'"),
+                           _("Unable to find '%1$s' firmware that is compatible with the current configuration"),
                            virDomainOsDefFirmwareTypeToString(def->os.firmware));
             return -1;
         }
index 4cfde1bd2e17035a03c02bf3324f064d5877652c..3edb2b34511a589b675c3048df93272640cdb75d 100644 (file)
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
index 4cfde1bd2e17035a03c02bf3324f064d5877652c..3edb2b34511a589b675c3048df93272640cdb75d 100644 (file)
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
index 4cfde1bd2e17035a03c02bf3324f064d5877652c..3edb2b34511a589b675c3048df93272640cdb75d 100644 (file)
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
index 4cfde1bd2e17035a03c02bf3324f064d5877652c..3edb2b34511a589b675c3048df93272640cdb75d 100644 (file)
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration