diff options
| author | Warner Losh <imp@FreeBSD.org> | 2026-06-26 14:45:55 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-06-26 14:54:36 +0000 |
| commit | 82eb1970759de3fb7eacbbfc1e53bf64bf48dfe4 (patch) | |
| tree | f2ab59a688d537c56c3d6b7fdaa28020b45002a7 /stand | |
| parent | ce9bfd781679ba67123345352a754c2e2dd1ef0b (diff) | |
Diffstat (limited to 'stand')
| -rw-r--r-- | stand/efi/loader/main.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 961ccc8f7065..78b397ca6870 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -629,10 +629,20 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) efi_devpath_free(devpath); if (dp == NULL) break; - printf(" Setting currdev to UEFI path %s\n", - rootdev); - set_currdev_pdinfo(dp); - return (0); + printf(" Trying uefi_rootdev %s\n", rootdev); + /* if just a partition, just try that */ + h = NULL; + if (dp->pd_parent != NULL) { + if (try_as_currdev(dp, false)) + return (0); + /* That failed? Try the whole disk, but skip this part */ + h = dp->pd_handle; + dp = dp->pd_parent; + } + /* otherwise, it's a full disk, so try all its partitions */ + if (try_disk_and_partitions(dp, h) == 0) + return (0); + break; } while (0); /* |
