summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/type-preservation.dt.yaml1
-rw-r--r--tests/type-preservation.dts1
-rw-r--r--treesource.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/tests/type-preservation.dt.yaml b/tests/type-preservation.dt.yaml
index a0cc64c..ae5efcf 100644
--- a/tests/type-preservation.dt.yaml
+++ b/tests/type-preservation.dt.yaml
@@ -15,6 +15,7 @@
a-string-with-nulls: ["foo\0bar", "baz"]
a-phandle: [[!phandle 0x1]]
a-phandle-with-args: [[!phandle 0x1, 0x0, 0x1], [!phandle 0x1, 0x2, 0x3]]
+ mixed-ints-and-phandles: [[0x1, !phandle 0x1, 0x2, !phandle 0x1]]
subsubnode:
compatible: ["subsubnode1", "subsubnode"]
phandle: [[0x1]]
diff --git a/tests/type-preservation.dts b/tests/type-preservation.dts
index 921ea21..9802fab 100644
--- a/tests/type-preservation.dts
+++ b/tests/type-preservation.dts
@@ -18,6 +18,7 @@
a-string-with-nulls = "foo\0bar", "baz";
a-phandle = <&subsub1>;
a-phandle-with-args = <&subsub1 0x00 0x01>, <&subsub1 0x02 0x03>;
+ mixed-ints-and-phandles = <0x01 &subsub1 0x02 &subsub1>;
subsub1: subsubnode {
compatible = "subsubnode1", "subsubnode";
diff --git a/treesource.c b/treesource.c
index 33fedee..9b17b37 100644
--- a/treesource.c
+++ b/treesource.c
@@ -241,6 +241,8 @@ static void write_propval(FILE *f, struct property *prop)
} else {
write_propval_int(f, p, chunk_len, 4);
}
+ if (data_len > chunk_len)
+ fputc(' ', f);
break;
case TYPE_UINT64:
write_propval_int(f, p, chunk_len, 8);