cmd: usbdown: pass through for nonexistent files
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 27 Oct 2016 02:38:56 +0000 (11:38 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 11 Apr 2017 09:58:17 +0000 (18:58 +0900)
After changing error value of update command with the commit f388818
("cmd: usbdown: fix return value for cmd funtions"), the usbdown
command stopped if there is nonexistent file. So this patch makes
usbdown command pass through for nonexistent files.

Change-Id: If1c53c1fca7879b2ed95a2298463eb7498f7b169
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
cmd/usbdown.c

index 81350ed5ffe578facd166d59e0d217ee8a4c6b65..18132d97da5771ef4b5c69bcfd3d5e727fad25c3 100644 (file)
@@ -362,7 +362,8 @@ int do_update(cmd_tbl_t *cmdtp, int flags, int argc, char * const argv[])
                ret = fs_size(filename, &size);
                if (ret < 0) {
                        printf("There is no %s\n", filename);
-                       return CMD_RET_FAILURE;
+                       /* if there is no file, then just pass through */
+                       return CMD_RET_SUCCESS;
                }
 
                usbdown = usbdown_get_entity(alt_num);