diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -505,8 +505,7 @@ * a drop to the OK boot loader prompt is possible. */ static int -find_currdev(bool do_bootmgr, bool is_last, - char *boot_info, size_t boot_info_sz) +find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) { pdinfo_t *dp, *pp; EFI_DEVICE_PATH *devpath, *copy; @@ -1202,7 +1201,7 @@ main(int argc, CHAR16 *argv[]) { int howto, i, uhowto; - bool has_kbd, is_last; + bool has_kbd; char *s; EFI_DEVICE_PATH *imgpath; CHAR16 *text; @@ -1405,7 +1404,6 @@ printf(" %04x%s", boot_order[i], boot_order[i] == boot_current ? "[*]" : ""); printf("\n"); - is_last = boot_order[(sz / sizeof(boot_order[0])) - 1] == boot_current; } else if (uefi_boot_mgr) { /* * u-boot doesn't set BootOrder, but otherwise participates in the @@ -1413,7 +1411,6 @@ * a failure. */ boot_order[0] = boot_current; - is_last = true; } } @@ -1462,7 +1459,7 @@ * the boot protocol and also allow an escape hatch for users wishing * to try something different. */ - if (find_currdev(uefi_boot_mgr, is_last, boot_info, bisz) != 0) + if (find_currdev(uefi_boot_mgr, boot_info, bisz) != 0) if (uefi_boot_mgr && !interactive_interrupt("Failed to find bootable partition")) return (EFI_NOT_FOUND);