mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2025-02-12 13:48:23 +00:00
fiptool: Support non-decimal --align arguments
An alignment value of 0x4000 is much easier to type than 16384, so enhance get_image_align() to recognize a 0x prefix for hexadecimals. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
3fb340a2b4
commit
fb5f794955
@ -646,7 +646,7 @@ static unsigned long get_image_align(char *arg)
|
||||
unsigned long align;
|
||||
|
||||
errno = 0;
|
||||
align = strtoul(arg, &endptr, 10);
|
||||
align = strtoul(arg, &endptr, 0);
|
||||
if (*endptr != '\0' || !is_power_of_2(align) || errno != 0)
|
||||
log_errx("Invalid alignment: %s", arg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user