mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] socfpga_mkimage: Fix/clarify error message
@ 2015-07-08  6:20 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2015-07-08  6:20 UTC (permalink / raw)
  To: Barebox List

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>
---
 scripts/socfpga_mkimage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/socfpga_mkimage.c b/scripts/socfpga_mkimage.c
index bab1b1a..1a7a66d 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);
 	}
 
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-08  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  6:20 [PATCH] socfpga_mkimage: Fix/clarify error message Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox