diff options
author | Simon Glass <sjg@chromium.org> | 2011-10-24 18:00:05 +0000 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-11-17 18:11:28 -0800 |
commit | 3039845847edd5fd7ac122b3c65aa20b280c10eb (patch) | |
tree | fbd341767bfcc216d3613f06032ead3431b91cc3 | |
parent | 78a82e4bab98d224528e81ee57e37e0a9b9b2628 (diff) |
BACKPORT: net: tftpput: Support selecting get/put for tftp
TftpStart should support starting either a get or a put.
(cherry-picked from 58f317d)
Change-Id: Ic221520a1c7cb00536a42d3ab531efbcaba35bf6
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11799
-rw-r--r-- | include/net.h | 2 | ||||
-rw-r--r-- | net/bootp.c | 2 | ||||
-rw-r--r-- | net/tftp.c | 3 | ||||
-rw-r--r-- | net/tftp.h | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/include/net.h b/include/net.h index c5a1c65fbc2..28c3f8c2d19 100644 --- a/include/net.h +++ b/include/net.h @@ -385,7 +385,7 @@ extern int NetRestartWrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, - TFTPSRV + TFTPSRV, TFTPPUT }; /* from net/net.c */ diff --git a/net/bootp.c b/net/bootp.c index ab03d2ea1a4..e04547a6078 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -164,8 +164,8 @@ static void auto_load(void) return; } #endif - TftpStart(); } + TftpStart(TFTPGET); } #if !defined(CONFIG_CMD_DHCP) diff --git a/net/tftp.c b/net/tftp.c index 7e508934860..2bab1f7cfdd 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -599,8 +599,7 @@ TftpTimeout(void) } -void -TftpStart(void) +void TftpStart(enum proto_t protocol) { char *ep; /* Environment pointer */ diff --git a/net/tftp.h b/net/tftp.h index 3abdf7bc267..c51aa253c47 100644 --- a/net/tftp.h +++ b/net/tftp.h @@ -16,7 +16,7 @@ */ /* tftp.c */ -extern void TftpStart (void); /* Begin TFTP get */ +void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */ #ifdef CONFIG_CMD_TFTPSRV extern void TftpStartServer(void); /* Wait for incoming TFTP put */ |