Browse Source

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: 8c59a97ce0 ("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>
main
Rob Herring 6 years ago committed by David Gibson
parent
commit
da2b691ccf
  1. 6
      treesource.c

6
treesource.c

@ -239,10 +239,10 @@ static void write_propval(FILE *f, struct property *prop) @@ -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);

Loading…
Cancel
Save