Commit 7cdebc3289b05b355dcd718688cf3c0cc83ddb25
Committed by
Tom Rini
1 parent
643aae1406
Exists in
master
and in
50 other branches
cmd_ubifs: normalize 'file not found' errors
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Showing 1 changed file with 8 additions and 4 deletions Side-by-side Diff
common/cmd_ubifs.c
... | ... | @@ -104,8 +104,10 @@ |
104 | 104 | debug("Using filename %s\n", filename); |
105 | 105 | |
106 | 106 | ret = ubifs_ls(filename); |
107 | - if (ret) | |
108 | - printf("%s not found!\n", filename); | |
107 | + if (ret) { | |
108 | + printf("** File not found %s **\n", filename); | |
109 | + ret = CMD_RET_FAILURE; | |
110 | + } | |
109 | 111 | |
110 | 112 | return ret; |
111 | 113 | } |
... | ... | @@ -140,8 +142,10 @@ |
140 | 142 | debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size); |
141 | 143 | |
142 | 144 | ret = ubifs_load(filename, addr, size); |
143 | - if (ret) | |
144 | - printf("%s not found!\n", filename); | |
145 | + if (ret) { | |
146 | + printf("** File not found %s **\n", filename); | |
147 | + ret = CMD_RET_FAILURE; | |
148 | + } | |
145 | 149 | |
146 | 150 | return ret; |
147 | 151 | } |