diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2010-03-09 17:39:14 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2010-03-10 08:13:00 -0600 |
commit | 73dca9ae0b9abe6924ba640164ecce9f8df69c5a (patch) | |
tree | 85d1e45a647596845cb1fb759d1d953135fa5978 /convert-dtsv0-lexer.l | |
parent | 74f6a51b1f71ffc7d9557e063630469a93eeddec (diff) | |
download | dtc-73dca9ae0b9abe6924ba640164ecce9f8df69c5a.zip dtc-73dca9ae0b9abe6924ba640164ecce9f8df69c5a.tar.gz dtc-73dca9ae0b9abe6924ba640164ecce9f8df69c5a.tar.bz2 |
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>
Diffstat (limited to 'convert-dtsv0-lexer.l')
0 files changed, 0 insertions, 0 deletions