From ed9c58522f062a329ddd3d61c5054c86829ccfcd Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 8 Jul 2016 18:20:48 +0000 Subject: [PATCH] Fix check for "name" property. Restores synthesised "name" proprties in eeprom -p output that were lost in revision 1.13. --- sys/dev/ofw/fdt.c | 4 ++-- 1 file 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 @@ -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) -- 2.20.1