aboutsummaryrefslogtreecommitdiff
path: root/cmd/sleep.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2021-01-22 12:27:31 +0100
committerTom Rini <trini@konsulko.com>2021-01-27 17:07:48 -0500
commit54f884bb0b1ebc16946890bb8349fe0ca2455bb2 (patch)
treeeaf9b03553cbea1907d578a86799aafaf4887504 /cmd/sleep.c
parente89ef172f88118ce036eb46d660f857c9209b194 (diff)
downloadu-boot-54f884bb0b1ebc16946890bb8349fe0ca2455bb2.zip
u-boot-54f884bb0b1ebc16946890bb8349fe0ca2455bb2.tar.gz
u-boot-54f884bb0b1ebc16946890bb8349fe0ca2455bb2.tar.bz2
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 <m.szyprowski@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'cmd/sleep.c')
-rw-r--r--cmd/sleep.c2
1 files changed, 1 insertions, 1 deletions
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);
}