[PATCH] cmd: misc: Fix return value for the sleep command
Jaehoon Chung
jh80.chung at samsung.com
Wed Jan 27 00:51:31 CET 2021
On 1/22/21 8:27 PM, Marek Szyprowski wrote:
> If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1
> (CMD_RET_USAGE).
>
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>
Best Regards,
Jaehoon Chung
> ---
> cmd/sleep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/sleep.c b/cmd/sleep.c
> index f0c78a8efb..1fff400c79 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);
> }
>
More information about the U-Boot
mailing list