git: 7140742c8c68 - main - loader.efi: Add verbose flag to try_as_currdev

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 26 Jun 2026 14:59:17 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=7140742c8c684c96644c094ed489ff5167c77c5a

commit 7140742c8c684c96644c094ed489ff5167c77c5a
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-06-26 14:45:46 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-06-26 14:54:35 +0000

    loader.efi: Add verbose flag to try_as_currdev
    
    Since we print almost everywhere before we call this, centralize the
    devpath to text dance here.
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D57801
---
 stand/efi/loader/main.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 1d91c8dd26ac..e11f8b1c3833 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -340,9 +340,20 @@ probe_md_currdev(void)
 }
 #endif
 
+/*
+ * Try the passed in partition or entire disk to see if we can find a bootable
+ * partition or zpool.
+ */
 static bool
-try_as_currdev(pdinfo_t *hd, pdinfo_t *pp)
+try_as_currdev(pdinfo_t *pp, bool verbose)
 {
+	if (verbose) {
+		CHAR16 *text = efi_devpath_name(pp->pd_devpath);
+		if (text != NULL) {
+			printf("Trying: %S\n", text);
+			efi_free_devpath_name(text);
+		}
+	}
 #ifdef EFI_ZFS_BOOT
 	uint64_t guid;