From 64602b43eeeae8e5a47c70b5158ecfeaa9dbdbbf Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Sat, 25 Apr 2020 15:05:34 +0900 Subject: [PATCH] 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 --- cmd/thordown.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/thordown.c b/cmd/thordown.c index 0e7a945998..b829ed4f5f 100644 --- a/cmd/thordown.c +++ b/cmd/thordown.c @@ -65,12 +65,13 @@ int do_thor_down(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) ret = thor_init(); 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; } -- 2.34.1