dtoverlay: Fix path rebasing and exports

There was an off-by-one in the path rebasing code that caused it to
copy overlay-relative paths verbatim instead of rebasing them to
fit the target DTB.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
Phil Elwell
2022-03-22 11:20:12 +00:00
committed by Dom Cobley
parent d1e92d79e5
commit 2a6306b1a0

View File

@@ -1052,7 +1052,7 @@ static int dtoverlay_apply_overlay_paths(DTBLOB_T *base_dtb, int strings_off,
p = strchr(sym_path + 1, '/'); p = strchr(sym_path + 1, '/');
if (!p || strncmp(p + 1, "__overlay__", 11) != 0 || if (!p || strncmp(p + 1, "__overlay__", 11) != 0 ||
(p[11] != '/' && p[11] != '\0')) (p[12] != '/' && p[12] != '\0'))
goto copy_verbatim; goto copy_verbatim;
/* Rebase the symbol path so that /* Rebase the symbol path so that