u-boot/libfdt
David Gibson 0219399a4e libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen()
As well as fdt_subnode_offset(), libfdt includes an
fdt_subnode_offset_namelen() function that takes the subnode name to
look up not as a NUL-terminated string, but as a string with an
explicit length.  This can be useful when the caller has the name as
part of a longer string, such as a full path.

However, we don't have corresponding 'namelen' versions for
fdt_get_property() and fdt_getprop().  There are less obvious use
cases for these variants on property names, but there are
circumstances where they can be useful e.g. looking up property names
which need to be parsed from a longer string buffer such as user input
or a configuration file, or looking up an alias in a path with
IEEE1275 style aliases.

So, since it's very easy to implement such variants, this patch does
so.  The original NUL-terminated variants are, of course, implemented
in terms of the namelen versions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-08-24 22:20:50 -04:00
..
fdt.c libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
fdt_ro.c libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen() 2008-08-24 22:20:50 -04:00
fdt_rw.c libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
fdt_strerror.c libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
fdt_sw.c libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
fdt_wip.c libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
libfdt_internal.h libfdt: Increase namespace-pollution paranoia 2008-08-24 22:20:49 -04:00
Makefile Big white-space cleanup. 2008-05-21 00:14:08 +02:00
README Big white-space cleanup. 2008-05-21 00:14:08 +02:00

The libfdt functionality was written by David Gibson.  The original
source came from the git repository:

URL:		git://ozlabs.org/home/dgibson/git/libfdt.git

author		David Gibson <dgibson@sneetch.(none)>
		Fri, 23 Mar 2007 04:16:54 +0000 (15:16 +1100)
committer	David Gibson <dgibson@sneetch.(none)>
		Fri, 23 Mar 2007 04:16:54 +0000 (15:16 +1100)
commit		857f54e79f74429af20c2b5ecc00ee98af6a3b8b
tree		2f648f0f88225a51ded452968d28b4402df8ade0
parent		07a12a08005f3b5cd9337900a6551e450c07b515

To adapt for u-boot usage, only the applicable files were copied and
imported into the u-boot git repository.
Omitted:
* GPL - u-boot comes with a copy of the GPL license
* test subdirectory - not directly useful for u-boot

After importing, other customizations were performed.  See the git log
for details.

Jerry Van Baren