summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Mavrodiev <stefan@olimex.com>2019-11-11 10:04:43 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2019-11-15 20:42:47 +1100
commitd9c55f855b65872e9cc74799499416414441c217 (patch)
treeda194f52ade7dac80cd0752d45561fafca1d41b7
parent7a22132c79ecbefc6dccfc14ee5d4aae5ef2f452 (diff)
downloaddevice-tree-compiler-d9c55f855b65872e9cc74799499416414441c217.tar.gz
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>
-rw-r--r--libfdt/fdt_overlay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
index be71873..b310e49 100644
--- a/libfdt/fdt_overlay.c
+++ b/libfdt/fdt_overlay.c
@@ -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__ */