Module Name: src
Committed By: jmcneill
Date: Sat Mar 9 13:16:42 UTC 2019
Modified Files:
src/sys/stand/efiboot: efiblock.c
Log Message:
Workaround a bug with ROCKPro64's U-Boot EFI implementation. The booted
device path when booting from SD card sometimes does not include a
MEDIA_DEVICE_PATH component, so in this case fallback to doing an exact
match on the booted device path with the block device path to detect the
default boot device.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/stand/efiboot/efiblock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/stand/efiboot/efiblock.c
diff -u src/sys/stand/efiboot/efiblock.c:1.4 src/sys/stand/efiboot/efiblock.c:1.5
--- src/sys/stand/efiboot/efiblock.c:1.4 Thu Nov 1 00:43:38 2018
+++ src/sys/stand/efiboot/efiblock.c Sat Mar 9 13:16:42 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efiblock.c,v 1.4 2018/11/01 00:43:38 jmcneill Exp $ */
+/* $NetBSD: efiblock.c,v 1.5 2019/03/09 13:16:42 jmcneill Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <[email protected]>
@@ -315,6 +315,8 @@ efi_block_probe(void)
depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH);
if (depth == 0)
depth = 1;
+ else if (depth == -1)
+ depth = 2;
}
for (n = 0; n < efi_nblock; n++) {