summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-08 08:19:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-08 08:19:31 +0200
commit2afe71f5674a64707893a956156b12e7b7dc43c9 (patch)
treea5f1f479416da880bc8272c44971d4ffc042fcd9 /scripts
parentd370efef5be7793be3121522267cdb7356ac4961 (diff)
downloadbarebox-2afe71f5674a64707893a956156b12e7b7dc43c9.tar.gz
barebox-2afe71f5674a64707893a956156b12e7b7dc43c9.tar.xz
socfpga_mkimage: Fix/clarify error message
The actual max_image_size may be smaller than the define MAX_IMAGE_SIZE due to the additional header needed, so print max_image_size in the error message. Also, when complaining about a too big image say how big the image actually is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/socfpga_mkimage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/socfpga_mkimage.c b/scripts/socfpga_mkimage.c
index bab1b1abce..1a7a66d988 100644
--- a/scripts/socfpga_mkimage.c
+++ b/scripts/socfpga_mkimage.c
@@ -234,8 +234,8 @@ int main(int argc, char *argv[])
}
if (s.st_size > max_image_size) {
- fprintf(stderr, "input image too big. Maximum is %d bytes\n",
- MAX_IMAGE_SIZE);
+ fprintf(stderr, "input image too big. Maximum is %d bytes, got %ld bytes\n",
+ max_image_size, s.st_size);
exit(1);
}