[PATCH] tftp return value

Jan Weitzel J.Weitzel at phytec.de
Wed Apr 14 04:06:06 EDT 2010


tftp returns transfered bytes on success and 1 in error case. Bad for
scripting. Change to 0 on success

Signed-off-by: Jan Weitzel <J.Weitzel at phytec.de>
---
Index: barebox-2010.04.0/net/tftp.c
===================================================================
--- barebox-2010.04.0.orig/net/tftp.c	2010-04-14 09:41:37.489858785
+0200
+++ barebox-2010.04.0/net/tftp.c	2010-04-14 09:43:33.899445811 +0200
@@ -281,8 +281,7 @@
 
 	TftpStart(remotefile);
 
-	rcode = NetLoop();
-	if (rcode < 0) {
+	if (NetLoop() < 0) {
 		rcode = 1;
 		goto out;
 	}




More information about the barebox mailing list