]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd_ubifs: normalize 'file not found' errors
authorTim Harvey <tharvey@gateworks.com>
Wed, 9 Oct 2013 23:32:26 +0000 (01:32 +0200)
committerTom Rini <trini@ti.com>
Fri, 8 Nov 2013 20:25:13 +0000 (15:25 -0500)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
common/cmd_ubifs.c

index eba54fd004c64924759089024b2da9b6bec1f400..d9af023d703d08319bc196cf76b3585ea5b54196 100644 (file)
@@ -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;
 }