diff options
| author | Renaud Métrich <rmetrich@redhat.com> | 2021-10-05 08:47:52 +0200 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-10-12 10:29:57 -0400 |
| commit | 1e4a858bba0afdbd36b9c1a11b9954ef8b871843 (patch) | |
| tree | 4f878796b2faacf342a97e1c032cbca44df04447 | |
| parent | e54e5858844242d2900a036af07cef9e3bff8d02 (diff) | |
| download | efi-boot-shim-1e4a858bba0afdbd36b9c1a11b9954ef8b871843.tar.gz efi-boot-shim-1e4a858bba0afdbd36b9c1a11b9954ef8b871843.zip | |
Revert "fallback: find_boot_option() needs to return the index for the boot entry in optnum"
This reverts commit 1b30c2b9e5ee7d3e305a28a92805152d5cbfc9cb.
This commit was creating duplicated entries when the "Linux" entry was
not already in the BootOrder list, which may happen upon firmware reset.
| -rw-r--r-- | fallback.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -486,15 +486,10 @@ find_boot_option(EFI_DEVICE_PATH *dp, EFI_DEVICE_PATH *fulldp, first_new_option_size = StrLen(arguments) * sizeof (CHAR16); } - /* find the index for the matching entry in BootOrder */ - UINT16 bootnum = xtoi(varname + 4); - for (*optnum = 0; *optnum < nbootorder; (*optnum)++) { - if (bootorder[*optnum] == bootnum) { - FreePool(candidate); - FreePool(data); - return EFI_SUCCESS; - } - } + *optnum = xtoi(varname + 4); + FreePool(candidate); + FreePool(data); + return EFI_SUCCESS; } FreePool(candidate); FreePool(data); |
