aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Khalifa <vexeduxr@FreeBSD.org>2025-09-09 17:19:55 +0000
committerAhmad Khalifa <vexeduxr@FreeBSD.org>2025-09-09 17:19:55 +0000
commit18141961df8ce00d44da83989d06a789e8415491 (patch)
tree4fd9d3881c56f044b46d2b2c481a3d6d68bf93a0
parentb4c5d5827fdd4c4cf6c1c7576c29a4b3345a7390 (diff)
loader/efi: remove is_last parameter from find_currdev
It is unused. Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D52434
-rw-r--r--stand/efi/loader/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index d05e11f8eadd..208b8b424e60 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -505,8 +505,7 @@ match_boot_info(char *boot_info, size_t bisz)
* 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 @@ EFI_STATUS
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 @@ main(int argc, CHAR16 *argv[])
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 @@ main(int argc, CHAR16 *argv[])
* a failure.
*/
boot_order[0] = boot_current;
- is_last = true;
}
}
@@ -1462,7 +1459,7 @@ main(int argc, CHAR16 *argv[])
* 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);