From 38410f801f75bcbaf1dde0887d916b5e2c4eefd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Petit?= <kevin.petit@arm.com> Date: Mon, 8 Dec 2014 13:23:09 +0000 Subject: [PATCH] fip_create: don't succeed if one of the passed files doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If one of the files passed to fip_create on the command line doesn't exist, it will print an error message but produce an incomplete fip.bin file and report success. This behaviour could potentially hide errors made in the command line arguments. This patch addresses the issue by having the tool bail out if one of the supplied files can't be processed. Signed-off-by: Kévin Petit <kevin.petit@arm.com> Fixes ARM-software/tf-issues#279 Change-Id: I1c7d87d09eb4c063005b7969bdaad1d043c29dec --- tools/fip_create/fip_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fip_create/fip_create.c b/tools/fip_create/fip_create.c index d1802b7fd..c940c5b0d 100644 --- a/tools/fip_create/fip_create.c +++ b/tools/fip_create/fip_create.c @@ -543,7 +543,7 @@ static int parse_cmdline(int argc, char **argv, struct option *options, if (status != 0) { printf("Failed to process %s\n", options[option_index].name); - break; + return status; } else { /* Update package */ *do_pack = 1; -- GitLab