From 54f884bb0b1ebc16946890bb8349fe0ca2455bb2 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 22 Jan 2021 12:27:31 +0100 Subject: [PATCH] cmd: misc: Fix return value for the sleep command If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung --- cmd/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sleep.c b/cmd/sleep.c index f0c78a8..1fff400 100644 --- a/cmd/sleep.c +++ b/cmd/sleep.c @@ -40,7 +40,7 @@ static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc, while (get_timer(start) < delay) { if (ctrlc()) - return (-1); + return CMD_RET_FAILURE; udelay(100); } -- 2.7.4