diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-07-04 20:38:21 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2016-07-04 20:38:21 +0200 |
commit | 222a02bc6fa9bf5148f3f2e282d10e7b93388128 (patch) | |
tree | 4a65d66b490648e09ab877663d9844f2c5977e17 /tools/firmware-utils | |
parent | dadb001958f7694b40f054ffd62a0b5b8335bc2f (diff) | |
download | master-187ad058-222a02bc6fa9bf5148f3f2e282d10e7b93388128.tar.gz master-187ad058-222a02bc6fa9bf5148f3f2e282d10e7b93388128.tar.bz2 master-187ad058-222a02bc6fa9bf5148f3f2e282d10e7b93388128.zip |
tools/mkfwimage2: remove 256 length limit for partition images
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'tools/firmware-utils')
-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, |