summaryrefslogtreecommitdiffstats
path: root/lib/libfdt/libfdt_internal.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2010-03-09 17:39:14 +1100
committerGerald Van Baren <gvb@unssw.com>2011-07-14 21:10:34 -0400
commitd1c6314887c4d6712f7bd9ba7428b6517e7732e0 (patch)
treea9024f1d034b79cf87dba9d49037e3b7543a9920 /lib/libfdt/libfdt_internal.h
parent05a22ba096fb996bb69ab020a8d08aafac2c28ba (diff)
downloadblackbird-obmc-uboot-d1c6314887c4d6712f7bd9ba7428b6517e7732e0.tar.gz
blackbird-obmc-uboot-d1c6314887c4d6712f7bd9ba7428b6517e7732e0.zip
libfdt: Implement property iteration functions
For ages, we've been talking about adding functions to libfdt to allow iteration through properties. So, finally, here are some. I got bogged down on this for a long time because I didn't want to expose offsets directly to properties to the callers. But without that, attempting to make reasonable iteration functions just became horrible. So eventually, I settled on an interface which does now expose property offsets. fdt_first_property_offset() and fdt_next_property_offset() are used to step through the offsets of the properties starting from a particularly node offset. The details of the property at each offset can then be retrieved with either fdt_get_property_by_offset() or fdt_getprop_by_offset() which have interfaces similar to fdt_get_property() and fdt_getprop() respectively. No explicit testcases are included, but we do use the new functions to reimplement the existing fdt_get_property() function. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> This was extracted from the DTC commit: 73dca9ae0b9abe6924ba640164ecce9f8df69c5a Mon Sep 17 00:00:00 2001 Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
Diffstat (limited to 'lib/libfdt/libfdt_internal.h')
-rw-r--r--lib/libfdt/libfdt_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfdt/libfdt_internal.h b/lib/libfdt/libfdt_internal.h
index d2dcbd65ee..381133ba81 100644
--- a/lib/libfdt/libfdt_internal.h
+++ b/lib/libfdt/libfdt_internal.h
@@ -63,6 +63,7 @@
}
int _fdt_check_node_offset(const void *fdt, int offset);
+int _fdt_check_prop_offset(const void *fdt, int offset);
const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
int _fdt_node_end_offset(void *fdt, int nodeoffset);
OpenPOWER on IntegriCloud