summaryrefslogtreecommitdiff
path: root/libfdt/fdt.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-08-29 14:19:13 +1000
committerGerald Van Baren <vanbaren@cideas.com>2008-10-01 22:01:51 -0400
commitbbdbc7cb3abefda5bd998edbcf0508fe6256327d (patch)
treecccddc19a4ff77c8af33dea4919d88ab5384357e /libfdt/fdt.c
parent8fd4166c467a46773f80208bda1ec3b4757747bc (diff)
downloadu-boot-imx-bbdbc7cb3abefda5bd998edbcf0508fe6256327d.zip
u-boot-imx-bbdbc7cb3abefda5bd998edbcf0508fe6256327d.tar.gz
u-boot-imx-bbdbc7cb3abefda5bd998edbcf0508fe6256327d.tar.bz2
libfdt: Fix bugs in fdt_get_path()
The current implementation of fdt_get_path() has a couple of bugs, fixed by this patch. First, contrary to its documentation, on success it returns the length of the node's path, rather than 0. The testcase is correspondingly wrong, and the patch fixes this as well. Second, in some circumstances, it will return -FDT_ERR_BADOFFSET instead of -FDT_ERR_NOSPACE when given insufficient buffer space. Specifically this happens when there is insufficient space even to hold the path's second last component. This behaviour is corrected, and the testcase updated to check it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt/fdt.c')
0 files changed, 0 insertions, 0 deletions