From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] socfpga_mkimage: Fix/clarify error message
Date: Wed, 8 Jul 2015 08:20:54 +0200 [thread overview]
Message-ID: <1436336454-21067-1-git-send-email-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2015-07-08 6:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436336454-21067-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox