From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCijM-0003F6-UG for barebox@lists.infradead.org; Wed, 08 Jul 2015 06:21:17 +0000 From: Sascha Hauer Date: Wed, 8 Jul 2015 08:20:54 +0200 Message-Id: <1436336454-21067-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] socfpga_mkimage: Fix/clarify error message 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 --- 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