mirror of
https://github.com/dgibson/dtc.git
synced 2026-01-22 09:40:33 -05:00
Mirror of DTC
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>
|
||
|---|---|---|
| Documentation | ||
| libfdt | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| comment-test.dts | ||
| data.c | ||
| dtc-lexer.l | ||
| dtc-parser.y | ||
| dtc.c | ||
| dtc.h | ||
| flat_dt.h | ||
| flattree.c | ||
| fstree.c | ||
| ftdump.c | ||
| GPL | ||
| livetree.c | ||
| Makefile | ||
| srcpos.c | ||
| srcpos.h | ||
| TODO | ||
| treesource.c | ||