X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fupdate.c;h=1c6aa186d0d091af65d5148aba6c0b68eabcb1b0;hb=4a886ec16ecd2cd2b8bb654d2f8b563f1f905f1c;hp=cc830a78657caaca7341a5c4ca20b06891186721;hpb=58494052b5fa1c2cbed9f1e04049f2951708cfa3;p=karo-tx-uboot.git diff --git a/common/update.c b/common/update.c index cc830a7865..1c6aa186d0 100644 --- a/common/update.c +++ b/common/update.c @@ -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,22 +55,22 @@ 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(BootFile); + 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"); /* download the update file */ load_addr = addr; - copy_filename(BootFile, filename, sizeof(BootFile)); - size = NetLoop(TFTPGET); + copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name)); + size = net_loop(TFTPGET); if (size < 0) rv = 1; @@ -78,15 +78,16 @@ 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) free(saved_netretry); if (saved_bootfile != NULL) { - copy_filename(BootFile, saved_bootfile, sizeof(BootFile)); + copy_filename(net_boot_file_name, saved_bootfile, + sizeof(net_boot_file_name)); free(saved_bootfile); }