Fix bug in -Odts with properties containing multiple terminating nulls

When in -Odts mode, dtc will not produce correct output for
string-like properties which have more than one \0 character at the
end of the property's bytestring.  In fact, it generates output which
is not syntactically correct.  This patch fixes the bug, and adds a
testcase for future regressions here.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2009-09-09 14:38:30 +10:00 committed by Jon Loeliger
parent 9c1a0df677
commit c623fe5c21
5 changed files with 90 additions and 15 deletions

View file

@ -11,6 +11,7 @@ LIB_TESTS_L = get_mem_rsv \
move_and_save mangle-layout nopulate \
open_pack rw_tree1 set_name setprop del_property del_node \
string_escapes references path-references boot-cpuid incbin \
extra-terminating-null \
dtbs_equal_ordered \
add_subnode_with_nops path_offset_aliases
LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%)