diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-06-11 04:12:38 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2016-06-14 22:13:37 -0700 |
commit | 5a5934f0c2ca51b5354370e97bb8662e75041756 (patch) | |
tree | 6fcb4c7d2ac7e374af2bf80baf71cbaea58eaaf9 | |
parent | 9233db23f3f6aa3449f37e06c4575dc6a595b879 (diff) | |
download | upstream-5a5934f0c2ca51b5354370e97bb8662e75041756.tar.gz upstream-5a5934f0c2ca51b5354370e97bb8662e75041756.tar.bz2 upstream-5a5934f0c2ca51b5354370e97bb8662e75041756.zip |
tools/mkfwimage2: remove 256 length limit for partition images
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
-rw-r--r-- | tools/firmware-utils/src/mkfwimage2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/mkfwimage2.c b/tools/firmware-utils/src/mkfwimage2.c index 146b2ad55d..89a98051b4 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; @@ -212,7 +216,7 @@ static int image_layout_add_partition(const char *part_desc) } 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, |