From: Seung-Woo Kim Date: Tue, 25 Jul 2017 05:20:23 +0000 (+0900) Subject: cmd: usbdown: handle error of file load command during update X-Git-Tag: accepted/tizen/unified/20191107.062134~123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e31ef7d6be235fe8118b73f6a50fcfbec6f184a;p=platform%2Fkernel%2Fu-boot.git cmd: usbdown: handle error of file load command during update The error of file load command from usb storage during update command is not handled, so wrong data is stored in the file for the case. Handle error of file load command during update not to store bad file. Change-Id: I4c7338eaea538e656ef52ce8c7214f71d0089b4a Signed-off-by: Seung-Woo Kim --- diff --git a/cmd/usbdown.c b/cmd/usbdown.c index 4ff6aec..9257304 100644 --- a/cmd/usbdown.c +++ b/cmd/usbdown.c @@ -414,8 +414,9 @@ int do_update(cmd_tbl_t *cmdtp, int flags, int argc, char * const argv[]) " %p", (void *)addr); sprintf(cmd_buf + strlen(cmd_buf), " %s", usbdown->name); - - run_command(cmd_buf, 0); + ret = run_command(cmd_buf, 0); + if (ret != CMD_RET_SUCCESS) + return ret; /* Write file */ opname = "write";