diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:52:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-07-29 19:52:30 +0000 |
commit | 62d0579ed85009010615ebf0115796b419203ea5 (patch) | |
tree | f3050f3ed95899716212251af2599cee547eb9a1 /sys/arch/amd64 | |
parent | d5a25a8d01789fab0f250e27f9c896b1ad9a9718 (diff) |
Fix off-by-one in return value of efi_device_path_depth().
ok patrick@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/stand/efiboot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/efiboot/efiboot.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/stand/efiboot/conf.c b/sys/arch/amd64/stand/efiboot/conf.c index 3b2059e414f..ba75269acc6 100644 --- a/sys/arch/amd64/stand/efiboot/conf.c +++ b/sys/arch/amd64/stand/efiboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.8 2017/06/01 11:32:15 patrick Exp $ */ +/* $OpenBSD: conf.c,v 1.9 2017/07/29 19:52:29 kettenis Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -38,7 +38,7 @@ #include "efiboot.h" #include "efidev.h" -const char version[] = "3.33"; +const char version[] = "3.34"; #ifdef EFI_DEBUG int debug = 0; diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c index 9b6d5fc00fd..4114f9137b5 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.20 2017/06/01 11:32:15 patrick Exp $ */ +/* $OpenBSD: efiboot.c,v 1.21 2017/07/29 19:52:29 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -222,7 +222,7 @@ efi_device_path_depth(EFI_DEVICE_PATH *dp, int dptype) for (i = 0; !IsDevicePathEnd(dp); dp = NextDevicePathNode(dp), i++) { if (DevicePathType(dp) == dptype) - return (i); + return (i + 1); } return (-1); |