From: Seung-Woo Kim Date: Sat, 25 Apr 2020 06:05:34 +0000 (+0900) Subject: cmd: thordown: Fix to show stopped message when interrupted X-Git-Tag: accepted/tizen/unified/20241126.175211~420 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1ebcbc79787b19229e9fd14dfa8732caff3285b;p=platform%2Fkernel%2Fu-boot.git cmd: thordown: Fix to show stopped message when interrupted The thordown command can be interrupted by Ctrl-C, and it can be identified with error value. Fix to show stopped message when interrupted. Change-Id: Idfe1a9dc1e168ea20c94d49ada497dc1b66bde52 Signed-off-by: Seung-Woo Kim --- diff --git a/cmd/thordown.c b/cmd/thordown.c index f4e633ba42..d1e1300957 100644 --- a/cmd/thordown.c +++ b/cmd/thordown.c @@ -68,12 +68,13 @@ int do_thor_down(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) ret = thor_init(udc); if (ret) { - printk("THOR DOWNLOAD failed: %d\n", ret); - if (ret == -EINTR) + if (ret == -EINTR) { + printk("THOR DOWNLOAD stopped\n"); ret = CMD_RET_SUCCESS; - else + } else { + printk("THOR DOWNLOAD failed: %d\n", ret); ret = CMD_RET_FAILURE; - + } goto exit; }