summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-07-29 19:52:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-07-29 19:52:30 +0000
commit62d0579ed85009010615ebf0115796b419203ea5 (patch)
treef3050f3ed95899716212251af2599cee547eb9a1 /sys
parentd5a25a8d01789fab0f250e27f9c896b1ad9a9718 (diff)
Fix off-by-one in return value of efi_device_path_depth().
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/stand/efiboot/conf.c4
-rw-r--r--sys/arch/amd64/stand/efiboot/efiboot.c4
-rw-r--r--sys/arch/arm64/stand/efiboot/conf.c4
-rw-r--r--sys/arch/arm64/stand/efiboot/efiboot.c4
4 files changed, 8 insertions, 8 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);
diff --git a/sys/arch/arm64/stand/efiboot/conf.c b/sys/arch/arm64/stand/efiboot/conf.c
index 74b3bc1614b..4f9e6028a52 100644
--- a/sys/arch/arm64/stand/efiboot/conf.c
+++ b/sys/arch/arm64/stand/efiboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 2017/07/24 12:12:09 patrick Exp $ */
+/* $OpenBSD: conf.c,v 1.5 2017/07/29 19:51:50 kettenis Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -35,7 +35,7 @@
#include "efiboot.h"
#include "efidev.h"
-const char version[] = "0.4";
+const char version[] = "0.5";
int debug = 0;
struct fs_ops file_system[] = {
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c
index 25c963da222..faf9f382a4f 100644
--- a/sys/arch/arm64/stand/efiboot/efiboot.c
+++ b/sys/arch/arm64/stand/efiboot/efiboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiboot.c,v 1.8 2017/07/24 12:12:09 patrick Exp $ */
+/* $OpenBSD: efiboot.c,v 1.9 2017/07/29 19:51:50 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -224,7 +224,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);