summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand/efiboot/efiboot.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-03-22 14:59:12 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-03-22 14:59:12 +0000
commit6239687c03b606750cd5114319cf620d14546a7f (patch)
treed8ff2f97c5bcc486e59458f262762877f33c74c4 /sys/arch/amd64/stand/efiboot/efiboot.c
parent4a44f03a66c2eeaa8bce4eaf3b4b97fe5de6d5e9 (diff)
Make efi_device_path_depth() return the full device path depth if we don't
find a media device path node. Fixes booting OpenBSD on some older U-Boot versions that are in wide circulation such as 2017.09 and 2017.11. ok patrick@
Diffstat (limited to 'sys/arch/amd64/stand/efiboot/efiboot.c')
-rw-r--r--sys/arch/amd64/stand/efiboot/efiboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c
index 73ce1606c61..a6bca1d64af 100644
--- a/sys/arch/amd64/stand/efiboot/efiboot.c
+++ b/sys/arch/amd64/stand/efiboot/efiboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiboot.c,v 1.34 2019/11/29 16:16:19 kettenis Exp $ */
+/* $OpenBSD: efiboot.c,v 1.35 2020/03/22 14:59:11 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -253,7 +253,7 @@ efi_device_path_depth(EFI_DEVICE_PATH *dp, int dptype)
return (i);
}
- return (-1);
+ return (i);
}
int