dtc/libfdt
David Gibson 73dca9ae0b 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>
2010-03-10 08:13:00 -06:00
..
Makefile.libfdt libfdt: Introduce libfdt shared library 2009-01-02 09:00:52 -06:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
fdt.c libfdt: Implement property iteration functions 2010-03-10 08:13:00 -06:00
fdt.h Fix whitespace in libfdt/fdt.h 2007-11-28 09:44:27 -06:00
fdt_ro.c libfdt: Implement property iteration functions 2010-03-10 08:13:00 -06:00
fdt_rw.c libfdt: Rework/cleanup fdt_next_tag() 2009-02-06 11:19:14 -06:00
fdt_strerror.c libfdt: Increase namespace-pollution paranoia 2008-07-14 12:36:27 -05:00
fdt_sw.c Fix a possible overflow case detected by gcc 4.3.2 2009-02-23 13:33:00 -06:00
fdt_wip.c libfdt: Rework fdt_next_node() 2009-02-06 11:19:10 -06:00
libfdt.h libfdt: Implement property iteration functions 2010-03-10 08:13:00 -06:00
libfdt_env.h dtc: Address an assortment of portability problems 2008-07-14 12:21:18 -05:00
libfdt_internal.h libfdt: Implement property iteration functions 2010-03-10 08:13:00 -06:00
version.lds libfdt: Add version.lds file 2009-01-02 08:56:42 -06:00