diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-08 08:19:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-08 08:19:31 +0200 |
commit | 2afe71f5674a64707893a956156b12e7b7dc43c9 (patch) | |
tree | a5f1f479416da880bc8272c44971d4ffc042fcd9 /scripts | |
parent | d370efef5be7793be3121522267cdb7356ac4961 (diff) | |
download | barebox-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.c | 4 |
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); } |