libfdt: Add support for using aliases in fdt_path_offset()

If the path doesn't start with '/' check to see if it matches some alias
under "/aliases" and substitute the matching alias value in the path
and retry the lookup.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Kumar Gala 2008-08-14 08:28:19 -05:00 committed by Jon Loeliger
parent cb650ae143
commit 02cc83540b
5 changed files with 104 additions and 3 deletions

View file

@ -214,6 +214,10 @@ dtc_tests () {
run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb
# Check aliases support in fdt_path_offset
run_dtc_test -I dts -O dtb -o aliases.dtb aliases.dts
run_test path_offset_aliases aliases.dtb
# Check /include/ directive
run_dtc_test -I dts -O dtb -o includes.test.dtb include0.dts
run_test dtbs_equal_ordered includes.test.dtb test_tree1.dtb