Browse Source

Remove trailing zero from the overlay path

The overlay path ends with trailing zero. When adding this path
as property value, this character should be removed. This is the case
when the overlay adds a node with an alias.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Message-Id: <20191111080444.9819-2-stefan@olimex.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Stefan Mavrodiev 5 years ago committed by David Gibson
parent
commit
d9c55f855b
  1. 2
      libfdt/fdt_overlay.c

2
libfdt/fdt_overlay.c

@ -752,7 +752,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) @@ -752,7 +752,7 @@ static int overlay_symbol_update(void *fdt, void *fdto)
if ((e - s) > len && (memcmp(s, "/__overlay__/", len) == 0)) {
/* /<fragment-name>/__overlay__/<relative-subnode-path> */
rel_path = s + len;
rel_path_len = e - rel_path;
rel_path_len = e - rel_path - 1;
} else if ((e - s) == len
&& (memcmp(s, "/__overlay__", len - 1) == 0)) {
/* /<fragment-name>/__overlay__ */

Loading…
Cancel
Save