Skip to content

Commit

Permalink
fiptool: Support non-decimal --align arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
afaerber committed Apr 24, 2017
1 parent 3fb340a commit fb5f794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/fiptool/fiptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fb5f794

Please sign in to comment.