lib: uefi: use the efi libvirt firmware if available

In case libvirt supports the firmware autoselection and there is an EFI
firmware available, use it directly instead of handling the firmware
manually.
This commit is contained in:
Pino Toscano
2020-01-15 17:26:56 +01:00
parent 029901113c
commit e636e64d34

View File

@@ -72,6 +72,15 @@ guestfs_int_get_uefi (guestfs_h *g, char *const *firmwares,
#ifdef __aarch64__
size_t i;
if (firmwares && firmware) {
for (i = 0; firmwares[i] != NULL; ++i) {
if (STREQ(firmwares[i], "efi")) {
*firmware = firmwares[i];
return 0;
}
}
}
for (i = 0; guestfs_int_uefi_aarch64_firmware[i].code != NULL; ++i) {
const char *codefile = guestfs_int_uefi_aarch64_firmware[i].code;
const char *code_debug_file =