diff options
author | Rob Herring <robh@kernel.org> | 2018-10-10 10:19:30 -0500 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-10-12 14:34:33 +1100 |
commit | da2b691ccf6863b2f5039d98e71f09d4244e5aa1 (patch) | |
tree | 5e49cb2ce2ef4c2ffb8ff33dd03bbede0408595c /treesource.c | |
parent | 8f8b77a0d62dbc0e7abee873a03ef34e9041a051 (diff) | |
download | dtc-da2b691ccf6863b2f5039d98e71f09d4244e5aa1.zip dtc-da2b691ccf6863b2f5039d98e71f09d4244e5aa1.tar.gz dtc-da2b691ccf6863b2f5039d98e71f09d4244e5aa1.tar.bz2 |
treesource: Fix dts output for phandles in middle of a sequence of ints
If we have a phandle in the middle of a sequence of numbers and
it is not bracketed (e.g. <0x1234 &phandle 0x5678>), the dts output will
be corrupted due to missing a space between the phandle value and the
following number.
Fixes: 8c59a97ce096 ("Fix missing labels when emitting dts format")
Cc: Grant Likely <grant.likely@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'treesource.c')
-rw-r--r-- | treesource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/treesource.c b/treesource.c index 93fd8ac..1529a0a 100644 --- a/treesource.c +++ b/treesource.c @@ -239,10 +239,10 @@ static void write_propval(FILE *f, struct property *prop) if (has_data_type_information(m)) { emit_type = m->type; fprintf(f, " %s", delim_start[emit_type]); - } - - if (m->type == LABEL) + } else if (m->type == LABEL) fprintf(f, " %s:", m->ref); + else if (m->offset) + fputc(' ', f); if (emit_type == TYPE_NONE) { assert(chunk_len == 0); |