[U-Boot] [PATCH 1/3] cmd_ubifs: normalize 'file not found' errors

Luka Perkov luka at openwrt.org
Thu Oct 10 01:32:26 CEST 2013


From: Tim Harvey <tharvey at gateworks.com>

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 common/cmd_ubifs.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index eba54fd..d9af023 100644
--- a/common/cmd_ubifs.c
+++ b/common/cmd_ubifs.c
@@ -104,8 +104,10 @@ int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	debug("Using filename %s\n", filename);
 
 	ret = ubifs_ls(filename);
-	if (ret)
-		printf("%s not found!\n", filename);
+	if (ret) {
+		printf("** File not found %s **\n", filename);
+		ret = CMD_RET_FAILURE;
+	}
 
 	return ret;
 }
@@ -140,8 +142,10 @@ int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size);
 
 	ret = ubifs_load(filename, addr, size);
-	if (ret)
-		printf("%s not found!\n", filename);
+	if (ret) {
+		printf("** File not found %s **\n", filename);
+		ret = CMD_RET_FAILURE;
+	}
 
 	return ret;
 }
-- 
1.8.4


More information about the U-Boot mailing list