diff mbox series

[libubootenv] src/uboot_env.c: Increase line length

Message ID 20240705084327.2333283-1-leon.anavi@konsulko.com
State Accepted
Headers show
Series [libubootenv] src/uboot_env.c: Increase line length | expand

Commit Message

Leon Anavi July 5, 2024, 8:43 a.m. UTC
Increase LINE_LENGTH from 1024 to 2048 because nowadays for some
boards U-Boot CONFIG_SYS_CBSIZE (and CONFIG_SYS_PBSIZE respectively)
is greater than 1024. This leads to truncating longer lines which
can be fatal in specific cases, for example with a long bootcmd.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 src/uboot_env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic July 5, 2024, 9:08 a.m. UTC | #1
Hi Leon,

On 05.07.24 10:43, Leon Anavi wrote:
> Increase LINE_LENGTH from 1024 to 2048 because nowadays for some
> boards U-Boot CONFIG_SYS_CBSIZE (and CONFIG_SYS_PBSIZE respectively)
> is greater than 1024. This leads to truncating longer lines which
> can be fatal in specific cases, for example with a long bootcmd.
>

Once was 1024 in U-Boot a huge value....

> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> ---
>   src/uboot_env.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/uboot_env.c b/src/uboot_env.c
> index 5c0865c..50ba87d 100644
> --- a/src/uboot_env.c
> +++ b/src/uboot_env.c
> @@ -1409,7 +1409,7 @@ cleanup:
>   	return status;
>   }
>
> -#define LINE_LENGTH 1024
> +#define LINE_LENGTH 2048
>   int libuboot_load_file(struct uboot_ctx *ctx, const char *filename)
>   {
>   	FILE *fp;

Acked-by: Stefano Babic <stefano.babic@swupdate.org>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/src/uboot_env.c b/src/uboot_env.c
index 5c0865c..50ba87d 100644
--- a/src/uboot_env.c
+++ b/src/uboot_env.c
@@ -1409,7 +1409,7 @@  cleanup:
 	return status;
 }
 
-#define LINE_LENGTH 1024
+#define LINE_LENGTH 2048
 int libuboot_load_file(struct uboot_ctx *ctx, const char *filename)
 {
 	FILE *fp;