net: tftpput: Support selecting get/put for tftp
TftpStart should support starting either a get or a put. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e4cde2f70d
commit
58f317d182
|
|
@ -367,7 +367,7 @@ extern int NetRestartWrap; /* Tried all network devices */
|
||||||
|
|
||||||
enum proto_t {
|
enum proto_t {
|
||||||
BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
|
BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
|
||||||
TFTPSRV
|
TFTPSRV, TFTPPUT
|
||||||
};
|
};
|
||||||
|
|
||||||
/* from net/net.c */
|
/* from net/net.c */
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ static void auto_load(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
TftpStart();
|
TftpStart(TFTPGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CONFIG_CMD_DHCP)
|
#if !defined(CONFIG_CMD_DHCP)
|
||||||
|
|
|
||||||
|
|
@ -595,8 +595,7 @@ TftpTimeout(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void TftpStart(enum proto_t protocol)
|
||||||
TftpStart(void)
|
|
||||||
{
|
{
|
||||||
char *ep; /* Environment pointer */
|
char *ep; /* Environment pointer */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* tftp.c */
|
/* tftp.c */
|
||||||
extern void TftpStart (void); /* Begin TFTP get */
|
void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_TFTPSRV
|
#ifdef CONFIG_CMD_TFTPSRV
|
||||||
extern void TftpStartServer(void); /* Wait for incoming TFTP put */
|
extern void TftpStartServer(void); /* Wait for incoming TFTP put */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue