From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] loads: use getenv_bool for 'loads_echo'
Date: Fri, 27 Sep 2013 08:30:02 +0200 [thread overview]
Message-ID: <1380263404-23104-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1380263404-23104-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/loads.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/commands/loads.c b/commands/loads.c
index bfc465b..58cd24b 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -40,14 +40,9 @@ static int do_load_serial(int argc, char *argv[])
ulong offset = 0;
ulong addr;
int i;
- const char *env_echo;
int rcode = 0;
- if (((env_echo = getenv("loads_echo")) != NULL) && (*env_echo == '1')) {
- do_echo = 1;
- } else {
- do_echo = 0;
- }
+ getenv_bool("loads_echo", &do_echo);
if (argc == 2) {
offset = simple_strtoul(argv[1], NULL, 16);
--
1.8.4.rc3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-09-27 6:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 6:30 getenv helpers Sascha Hauer
2013-09-27 6:30 ` [PATCH 1/4] environment variables: introduce new helpers Sascha Hauer
2013-09-27 6:30 ` Sascha Hauer [this message]
2013-09-27 6:30 ` [PATCH 3/4] bootm: Replace getenv_loadaddr with getenv_ul Sascha Hauer
2013-09-27 6:30 ` [PATCH 4/4] dhcp: replace dhcp_getenv_int with getenv_uint 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=1380263404-23104-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@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