summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2017-04-21 19:39:10 +0200
committerAndreas Färber <afaerber@suse.de>2017-04-24 12:46:44 +0200
commitfb5f7949558a06cc43cf3e6aced32cc4686158d3 (patch)
treecad038adb306ae57cad2112558de569b2b84692b
parent3fb340a2b45740d7233490ac9801d530403529e7 (diff)
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>
-rw-r--r--tools/fiptool/fiptool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c
index 542a9466..0503696b 100644
--- a/tools/fiptool/fiptool.c
+++ b/tools/fiptool/fiptool.c
@@ -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);