libfdt: Remove superfluous NUL character from overlay symbols
PATCH 1/1 libfdt: Remove superfluous NUL character from overlay symbols
The symbol path already ends with a NUL character (something which is actually checked by the code) and this NUL is included in rel_path_len, so there is no need to add a second one.
This change fixes incorrect display in "fdt list /__symbols" after applying an overlay with symbols.
--- scripts/dtc/libfdt/fdt_overlay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/dtc/libfdt/fdt_overlay.c +2 -3
@@ -757,7 +757,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) && (memcmp(s, "/__overlay__", len - 1) == 0)) { /* /<fragment-name>/__overlay__ */ rel_path = ""; - rel_path_len = 0; + rel_path_len = 1; /* Include NUL character */ } else {/* Symbol refers to something that won't end * up in the target tree */
@@ -794,7 +794,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) } ret =fdt_setprop_placeholder (fdt, root_sym, name, - len + (len >1 ) + rel_path_len +1 , &p); + len + (len >1 ) + rel_path_len, &p);if (ret <0 )return ret;
@@ -820,7 +820,6 @@ static int overlay_symbol_update(void *fdt, void *fdto) buf[len] ='/' ;memcpy (buf + len +1 , rel_path, rel_path_len); - buf[len +1 + rel_path_len] ='\0' ; }return 0 ;
Signature · 1 line
2.26.2
PATCH 1/1 libfdt: Remove superfluous NUL character from overlay symbols
Hi Marcus,
Quoted 5 lines · Marcus Comstedt
The symbol path already ends with a NUL character (something which is actually checked by the code) and this NUL is included in
rel_path_len, so there is no need to add a second one.
Quoted 7 lines
This change fixes incorrect display in "fdt list /__symbols" after applying an overlay with symbols.
Signed-off-by Marcus Comstedt <[email protected]>--- scripts/dtc/libfdt/fdt_overlay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Could you please send this patch upstream?
Quoted 32 lines
scripts/dtc/libfdt/fdt_overlay.c +2
-4@@ -757,7 +757,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) && (memcmp(s, "/__overlay__", len - 1) == 0)) { /* /<fragment-name>/__overlay__ */ rel_path = ""; - rel_path_len = 0; + rel_path_len = 1; /* Include NUL character */ } else {/* Symbol refers to something that won't end * up in the target tree */ @@ -794,7 +794,7 @@ static int overlay_symbol_update(void *fdt, void *fdto) } ret =fdt_setprop_placeholder (fdt, root_sym, name, - len + (len >1 ) + rel_path_len +1 , &p); + len + (len >1 ) + rel_path_len, &p);if (ret <0 )return ret;@@ -820,7 +820,6 @@ static int overlay_symbol_update(void *fdt, void *fdto) buf[len] ='/' ;memcpy (buf + len +1 , rel_path, rel_path_len); - buf[len +1 + rel_path_len] ='\0' ; }return 0 ; --
Quoted 2 lines
2.26.2
Regards,
Simon
PATCH 1/1 libfdt: Remove superfluous NUL character from overlay symbols
Hi Simon,
Quoted 1 line · Simon Glass
Could you please send this patch upstream?
Sure. But where is that, exactly?
// Marcus
A message that is not in the archive (sent off-list or not yet received): [email protected]
+Devicetree Compiler
Quoted 7 lines · Marcus Comstedt
Hi Simon,
Simon Glass <[email protected]> writes:
Quoted 9 lines
Quoted 1 line
Could you please send this patch upstream?
Sure. But where is that, exactly?
// Marcus
Hi Marcus,
You can send your patch to the mailing list on cc.
Also see README.fdt-control fo the the git repo and other details.
Regards,
Simon
Hi Simon,
Quoted 3 lines · Simon Glass
You can send your patch to the mailing list on cc.
Also see README.fdt-control fo the the git repo and other details.
Thanks. Sent.
// Marcus
A message that is not in the archive (sent off-list or not yet received): [email protected]
Simon Glass
Reviewed-byQuoted 8 lines · Marcus Comstedt
Hi Simon,
Quoted 2 lines · Simon Glass
You can send your patch to the mailing list on cc.
Quoted 9 lines
Quoted 1 line
Also see README.fdt-control fo the the git repo and other details.
Thanks. Sent.
// Marcus
A message that is not in the archive (sent off-list or not yet received): CAPnjgZ2C3HxdZqYAS_g-CEAq1CTVvdEvaz6NiCowpd11d9f5WA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
[email protected]
Reviewed-by Simon GlassQuoted 8 lines · Marcus Comstedt
Hi Simon,
Quoted 2 lines · Simon Glass
You can send your patch to the mailing list on cc.
Quoted 9 lines
Quoted 1 line
Also see README.fdt-control fo the the git repo and other details.
Thanks. Sent.
// Marcus
Applied to u-boot-dm, thanks!