svn commit: r259199 - head/sys/dev/ofw
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Dec 10 21:01:28 UTC 2013
Author: nwhitehorn
Date: Tue Dec 10 21:01:28 2013
New Revision: 259199
URL: http://svnweb.freebsd.org/changeset/base/259199
Log:
Return the correct IEEE 1275 code for "nextprop".
Modified:
head/sys/dev/ofw/ofw_fdt.c
Modified: head/sys/dev/ofw/ofw_fdt.c
==============================================================================
--- head/sys/dev/ofw/ofw_fdt.c Tue Dec 10 20:52:31 2013 (r259198)
+++ head/sys/dev/ofw/ofw_fdt.c Tue Dec 10 21:01:28 2013 (r259199)
@@ -267,8 +267,10 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac
}
/*
- * Get the next property of a package. Return the actual len of retrieved
- * prop name.
+ * Get the next property of a package. Return values:
+ * -1: package or previous property does not exist
+ * 0: no more properties
+ * 1: success
*/
static int
ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
@@ -310,7 +312,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa
strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size);
- return (strlen(buf));
+ return (1);
}
/* Set the value of a property of a package. */
More information about the svn-src-head
mailing list