[PATCH 2/4] loads: use getenv_bool for 'loads_echo'
Sascha Hauer
s.hauer at pengutronix.de
Fri Sep 27 02:30:02 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list