git: 18141961df8c - main - loader/efi: remove is_last parameter from find_currdev

From: Ahmad Khalifa <vexeduxr_at_FreeBSD.org>
Date: Tue, 09 Sep 2025 17:30:34 UTC
The branch main has been updated by vexeduxr:

URL: https://cgit.FreeBSD.org/src/commit/?id=18141961df8ce00d44da83989d06a789e8415491

commit 18141961df8ce00d44da83989d06a789e8415491
Author:     Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2025-09-09 17:19:55 +0000
Commit:     Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2025-09-09 17:19:55 +0000

    loader/efi: remove is_last parameter from find_currdev
    
    It is unused.
    
    Reviewed by:    tsoome
    Differential Revision:  https://reviews.freebsd.org/D52434
---
 stand/efi/loader/main.c | 9 +++------
 1 file 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);