[LEDE-DEV] [PATCH] tools/mkfwimage2: remove 256 length limit for partition images

John Crispin john at phrozen.org
Sun Jun 12 21:54:15 PDT 2016


could it be that the subject is wrong s/images/names/ ?

	John

On 11/06/2016 04:15, Alexander Couzens wrote:
> Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
> ---
>  tools/firmware-utils/src/mkfwimage2.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/firmware-utils/src/mkfwimage2.c b/tools/firmware-utils/src/mkfwimage2.c
> index 146b2ad..8255a04 100644
> --- a/tools/firmware-utils/src/mkfwimage2.c
> +++ b/tools/firmware-utils/src/mkfwimage2.c
> @@ -197,6 +197,10 @@ int str2u32(char *arg, u_int32_t *val)
>  	return 0;
>  }
>  
> +#ifndef STRINGIFY
> +#define STRINGIFY2(X) #X
> +#define STRINGIFY(X) STRINGIFY2(X)
> +#endif
>  static int image_layout_add_partition(const char *part_desc)
>  {
>  	part_data_t *d;
> @@ -211,8 +215,9 @@ static int image_layout_add_partition(const char *part_desc)
>  		return (-1);
>  	}
>  
> +
>  	d = &im.parts[im.part_count];
> -	t = sscanf(part_desc, "%15[-0-9a-zA-Z]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%256s",
> +	t = sscanf(part_desc, "%15[-0-9a-zA-Z]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%15[0-9a-fA-Fx]:%"STRINGIFY(PATH_MAX)"s",
>  			d->partition_name,
>  			offset,
>  			length,
> 



More information about the Lede-dev mailing list