Go to file
David Gibson bd2ae2f41c libfdt: Fix handling of trailing / in fdt_path_offset()
Currently, fdt_path_offset() returns FDL_ERR_BADOFFSET if given a path
with a trailing '/'.  In particular this means that
fdt_path_offset("/") returns FDT_ERR_BADOFFSET rather than 0 as one
would expect.

This patch fixes the function to accept and ignore trailing '/'
characters.  As well as allowing fdt_path_offset("/") this means that
fdt_path_offset("/foo/") will return the same as
fdt_path_offset("/foo") which seems in keeping with the principle of
least surprise.

This also adds a testcase to ensure that fdt_path_offset("/") returns
0 as it should.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-08-30 08:42:45 -05:00
Documentation Add initial Device Tree Compiler manual 2007-08-09 15:58:47 -05:00
libfdt libfdt: Fix handling of trailing / in fdt_path_offset() 2007-08-30 08:42:45 -05:00
scripts Add DTC release version information. 2007-07-07 13:52:25 -05:00
tests libfdt: Fix handling of trailing / in fdt_path_offset() 2007-08-30 08:42:45 -05:00
.gitignore Merge libfdt into dtc. 2007-06-14 15:05:55 +10:00
GPL dtc: Remove redundant copy of the GPL 2007-06-25 21:43:11 -05:00
Makefile DTC 1.0.0 2007-08-09 19:31:32 -05:00
TODO Update TODO 2005-10-19 16:29:52 +10:00
comment-test.dts Initial label support. Also switch to glr-parser mode and get rid of 2005-06-16 14:36:37 +10:00
data.c dtc: store labels in ascending order 2007-07-07 10:14:12 -05:00
dtc-lexer.l dtc: allow a label: in any dts context 2007-07-07 10:10:12 -05:00
dtc-parser.y dtc: implement labels on property data 2007-07-07 10:13:31 -05:00
dtc.c Add DTC release version information. 2007-07-07 13:52:25 -05:00
dtc.h dtc: implement labels on property data 2007-07-07 10:13:31 -05:00
flat_dt.h Improve options, #define default version. 2007-03-19 08:54:40 -05:00
flattree.c dtc: format memory reserve as pairs on two lines 2007-07-07 10:14:42 -05:00
fstree.c Rework tracking of reserve entries during processing. This is initial work 2005-10-24 18:18:38 +10:00
ftdump.c ftdump missing be32_to_cpu() on size cell. 2007-03-22 08:30:52 -05:00
livetree.c Remove bogus errors from check_chosen. 2007-03-26 08:34:23 -05:00
srcpos.c DTC: Add support for a C-like #include "file" mechanism. 2007-03-26 08:36:07 -05:00
srcpos.h dtc: move declaration of yyerror 2007-07-07 10:07:27 -05:00
treesource.c DTC: Add support for a C-like #include "file" mechanism. 2007-03-26 08:36:07 -05:00