From a3b5e1ec3e52bd7624e832a612a23fc2dd432abb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Wed, 29 Jun 2016 10:46:49 +0200 Subject: [PATCH] common/cmd_misc.c: fix return code of sleep command -1 is equivalent to CMD_RET_USAGE and makes the sleep command print its usage information when aborted by which is most probably not intended. --- common/cmd_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_misc.c b/common/cmd_misc.c index 93f9eabd6b..41bb860a0f 100644 --- a/common/cmd_misc.c +++ b/common/cmd_misc.c @@ -23,12 +23,12 @@ static int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) while (get_timer(start) < delay) { if (ctrlc()) - return (-1); + return CMD_RET_FAILURE; udelay(100); } - return 0; + return CMD_RET_SUCCESS; } U_BOOT_CMD( -- 2.39.2