summaryrefslogtreecommitdiffstats
path: root/commands/loads.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-09-25 08:09:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-30 10:28:58 +0200
commit7ade2ef4a90520f9498d8c040450e8414053bee8 (patch)
tree3d769a266980809bcecaeb96c566a4464b88d335 /commands/loads.c
parent5ee4ad2229b676ff521a1da9b8b32f474450f56c (diff)
downloadbarebox-7ade2ef4a90520f9498d8c040450e8414053bee8.tar.gz
loads: use getenv_bool for 'loads_echo'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/loads.c')
-rw-r--r--commands/loads.c7
1 files changed, 1 insertions, 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);