]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: misc: Fix return value for the sleep command
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 22 Jan 2021 11:27:31 +0000 (12:27 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 27 Jan 2021 22:07:48 +0000 (17:07 -0500)
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>
cmd/sleep.c

index f0c78a8efb623316c1b8f19ea10606b1565f4bfd..1fff400c7916d319f2f092b41e6af4b21223b86e 100644 (file)
@@ -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);
        }