提交 8885c5fe 编写于 作者: J Joe Hershberger 提交者: Simon Glass

net: cosmetic: Clean up TFTP variables and functions

Make a thorough pass through all variables and function names contained
within tftp and remove CamelCase and improve naming.
Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
Acked-by: NSimon Glass <sjg@chromium.org>
上级 1fd92db8
......@@ -39,8 +39,8 @@
#define CONFIG_UPDATE_TFTP_CNT_MAX 0
#endif
extern ulong TftpRRQTimeoutMSecs;
extern int TftpRRQTimeoutCountMax;
extern ulong tftp_timeout_ms;
extern int tftp_timeout_count_max;
extern flash_info_t flash_info[];
extern ulong load_addr;
......@@ -55,14 +55,14 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
rv = 0;
/* save used globals and env variable */
saved_timeout_msecs = TftpRRQTimeoutMSecs;
saved_timeout_count = TftpRRQTimeoutCountMax;
saved_timeout_msecs = tftp_timeout_ms;
saved_timeout_count = tftp_timeout_count_max;
saved_netretry = strdup(getenv("netretry"));
saved_bootfile = strdup(net_boot_file_name);
/* set timeouts for auto-update */
TftpRRQTimeoutMSecs = msec_max;
TftpRRQTimeoutCountMax = cnt_max;
tftp_timeout_ms = msec_max;
tftp_timeout_count_max = cnt_max;
/* we don't want to retry the connection if errors occur */
setenv("netretry", "no");
......@@ -78,8 +78,8 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
flush_cache(addr, size);
/* restore changed globals and env variable */
TftpRRQTimeoutMSecs = saved_timeout_msecs;
TftpRRQTimeoutCountMax = saved_timeout_count;
tftp_timeout_ms = saved_timeout_msecs;
tftp_timeout_count_max = saved_timeout_count;
setenv("netretry", saved_netretry);
if (saved_netretry != NULL)
......
......@@ -247,7 +247,7 @@ void net_auto_load(void)
net_set_state(NETLOOP_SUCCESS);
return;
}
TftpStart(TFTPGET);
tftp_start(TFTPGET);
}
static void NetInitLoop(void)
......@@ -372,11 +372,11 @@ restart:
case TFTPPUT:
#endif
/* always use ARP to get server ethernet address */
TftpStart(protocol);
tftp_start(protocol);
break;
#ifdef CONFIG_CMD_TFTPSRV
case TFTPSRV:
TftpStartServer();
tftp_start_server();
break;
#endif
#if defined(CONFIG_CMD_DHCP)
......
此差异已折叠。
......@@ -16,14 +16,14 @@
*/
/* tftp.c */
void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
void tftp_start(enum proto_t protocol); /* Begin TFTP get/put */
#ifdef CONFIG_CMD_TFTPSRV
extern void TftpStartServer(void); /* Wait for incoming TFTP put */
void tftp_start_server(void); /* Wait for incoming TFTP put */
#endif
extern ulong TftpRRQTimeoutMSecs;
extern int TftpRRQTimeoutCountMax;
extern ulong tftp_timeout_ms;
extern int tftp_timeout_count_max;
/**********************************************************************/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册