summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-07-08 18:20:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-07-08 18:20:49 +0000
commitcc7a429a385f945e0b4a419bcb5665ccaaabc174 (patch)
tree098237483f517741f73d5c2ea07896b019f8f789 /sys
parentff9d3fec3d2b7bd5d5905e7b86504d736e394c07 (diff)
Fix check for "name" property. Restores synthesised "name" proprties in
eeprom -p output that were lost in revision 1.13.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ofw/fdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ofw/fdt.c b/sys/dev/ofw/fdt.c
index e6e08b2ed49..77c497282a7 100644
--- a/sys/dev/ofw/fdt.c
+++ b/sys/dev/ofw/fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdt.c,v 1.15 2016/06/29 13:39:03 visa Exp $ */
+/* $OpenBSD: fdt.c,v 1.16 2016/07/08 18:20:48 kettenis Exp $ */
/*
* Copyright (c) 2009 Dariusz Swiderski <sfires@sfires.net>
@@ -845,7 +845,7 @@ OF_nextprop(int handle, char *prop, void *nextprop)
void *node = (char *)tree.header + handle;
char *data;
- if (fdt_node_property(node, "name", &data) == 0) {
+ if (fdt_node_property(node, "name", &data) == -1) {
if (strcmp(prop, "") == 0)
return strlcpy(nextprop, "name", OPROMMAXPARAM);
if (strcmp(prop, "name") == 0)