From: Jaehoon Chung Date: Wed, 27 Jan 2021 08:51:31 +0900 Subject: [PATCH] cmd: misc: Fix return value for the sleep command In-Reply-To: <20210122112731.10956-1-m.szyprowski@samsung.com> References: <20210122112731.10956-1-m.szyprowski@samsung.com> Message-ID: <8a3377ba-1009-ea26-39f3-239c434bcfe6@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Jaehoon Chung 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); > } >