All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: u-boot@lists.denx.de
Subject: [PATCH] cmd: misc: Fix return value for the sleep command
Date: Fri, 22 Jan 2021 12:27:31 +0100	[thread overview]
Message-ID: <20210122112731.10956-1-m.szyprowski@samsung.com> (raw)
In-Reply-To: CGME20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b@eucas1p1.samsung.com

If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1
(CMD_RET_USAGE).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 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);
 	}
-- 
2.17.1

       reply	other threads:[~2021-01-22 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210122112739eucas1p1ae7fa48eea75d2bf85f132f05eeb229b@eucas1p1.samsung.com>
2021-01-22 11:27 ` Marek Szyprowski [this message]
2021-01-24  2:03   ` [PATCH] cmd: misc: Fix return value for the sleep command Simon Glass
2021-01-26 23:51   ` Jaehoon Chung
2021-01-28 23:59   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210122112731.10956-1-m.szyprowski@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.