[PATCH 2/4] loads: use getenv_bool for 'loads_echo'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux