From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Subject: [PATCH 2/3] commands: readline: use exit code macros
Date: Wed, 10 Feb 2021 12:58:08 +0100 [thread overview]
Message-ID: <20210210115807.4223-2-r.czerwinski@pengutronix.de> (raw)
In-Reply-To: <20210210115807.4223-1-r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
commands/readline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commands/readline.c b/commands/readline.c
index 426f579ee4..796b4def95 100644
--- a/commands/readline.c
+++ b/commands/readline.c
@@ -16,13 +16,13 @@ static int do_readline(int argc, char *argv[])
if (readline(argv[1], buf, CONFIG_CBSIZE) < 0) {
free(buf);
- return 1;
+ return COMMAND_ERROR;
}
setenv(argv[2], buf);
free(buf);
- return 0;
+ return COMMAND_SUCCESS;
}
BAREBOX_CMD_HELP_START(readline)
--
2.30.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-02-10 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 11:58 [PATCH 1/3] commands: readline: sort includes Rouven Czerwinski
2021-02-10 11:58 ` Rouven Czerwinski [this message]
2021-02-10 11:58 ` [PATCH 3/3] commands: readline: release command slice Rouven Czerwinski
2021-02-12 9:06 ` [PATCH 1/3] commands: readline: sort includes Sascha Hauer
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=20210210115807.4223-2-r.czerwinski@pengutronix.de \
--to=r.czerwinski@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox