diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2009-09-09 14:38:30 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2009-11-11 07:34:01 -0600 |
commit | c623fe5c21e0358fc38a4e8ddb0d51379f0733e8 (patch) | |
tree | 33852e9281cd5074304435f308f134261d5ddf48 /tests/extra-terminating-null.dts | |
parent | 9c1a0df677bf0f4af622a404f6c738ad711326e0 (diff) | |
download | dtc-c623fe5c21e0358fc38a4e8ddb0d51379f0733e8.zip dtc-c623fe5c21e0358fc38a4e8ddb0d51379f0733e8.tar.gz dtc-c623fe5c21e0358fc38a4e8ddb0d51379f0733e8.tar.bz2 |
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>
Diffstat (limited to 'tests/extra-terminating-null.dts')
-rw-r--r-- | tests/extra-terminating-null.dts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/extra-terminating-null.dts b/tests/extra-terminating-null.dts new file mode 100644 index 0000000..b6cc19c --- /dev/null +++ b/tests/extra-terminating-null.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +/ { + extranull0 = "hello world"; + extranull1,1 = "hello world\0"; + extranull1,2 = "hello world", ""; + extranull2,1 = "hello world\0\0"; + extranull2,2 = "hello world", "", ""; + extranull2,3 = "hello world\0", ""; + extranull2,4 = "hello world", "\0"; +}; |