
Rework the bootargs concatenation logic to make the logic clearer and address several issues such as: - checking the value at the address kcmdline_extra instead of checking the address value itself - freeing the string that was malloced for the concatenation - making sure to malloc the right amount of bytes for the concatenated string, not forgetting the byte for the NULL termination
Signed-off-by: Nicolas Belin nbelin@baylibre.com --- Changes in v2: - Improve the logic to avoid trailing whitespaces in the concatenated bootargs - Drop the last patch reordering the length calculation as it is already done by the improved logic - Link to v1: https://lore.kernel.org/r/20241211-fix-bootargs-concatenation-v1-0-c6752bcb9...
--- Nicolas Belin (3): boot: android: fix extra command line support boot: android: free newbootargs when done boot: android: rework bootargs concatenation
boot/image-android.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) --- base-commit: b841e559cd26ffcb20f22e8ee75debed9616c002 change-id: 20241211-fix-bootargs-concatenation-8b616c110b63
Best regards,