mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-12 02:06:59 +02:00
boot: android: fix extra command line support
Check that the value at the address kcmdline_extra is not 0
instead of checking the address value itself keeping it
consistent with what is done for kcmdline.
Fixes: b36b227b
("android: boot: support extra command line")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-1-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
parent
25fb58e88a
commit
53a0ddb6d3
@ -292,7 +292,7 @@ int android_image_get_kernel(const void *hdr,
|
|||||||
len += strlen(img_data.kcmdline);
|
len += strlen(img_data.kcmdline);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (img_data.kcmdline_extra) {
|
if (*img_data.kcmdline_extra) {
|
||||||
printf("Kernel extra command line: %s\n", img_data.kcmdline_extra);
|
printf("Kernel extra command line: %s\n", img_data.kcmdline_extra);
|
||||||
len += strlen(img_data.kcmdline_extra);
|
len += strlen(img_data.kcmdline_extra);
|
||||||
}
|
}
|
||||||
@ -316,7 +316,7 @@ int android_image_get_kernel(const void *hdr,
|
|||||||
if (*img_data.kcmdline)
|
if (*img_data.kcmdline)
|
||||||
strcat(newbootargs, img_data.kcmdline);
|
strcat(newbootargs, img_data.kcmdline);
|
||||||
|
|
||||||
if (img_data.kcmdline_extra) {
|
if (*img_data.kcmdline_extra) {
|
||||||
strcat(newbootargs, " ");
|
strcat(newbootargs, " ");
|
||||||
strcat(newbootargs, img_data.kcmdline_extra);
|
strcat(newbootargs, img_data.kcmdline_extra);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user