From: Tim Harvey <tharvey@gateworks.com>
Date: Wed, 9 Oct 2013 23:32:26 +0000 (+0200)
Subject: cmd_ubifs: normalize 'file not found' errors
X-Git-Tag: v2025.01-rc5-pxa1908~15672
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=7cdebc3289b05b355dcd718688cf3c0cc83ddb25;p=u-boot.git

cmd_ubifs: normalize 'file not found' errors

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---

diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index eba54fd004..d9af023d70 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;
 }