]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/tftp.c
Remove CONFIG_SYS_BOOTCOUNT_SINGLEWORD
[people/ms/u-boot.git] / net / tftp.c
index ced45ec1f1f4aa836670115a8be30bf2e507b291..6671b1f7ca726acf44b6f18f41f9f017c10fd1ec 100644 (file)
@@ -706,11 +706,11 @@ void tftp_start(enum proto_t protocol)
         * TFTP protocol has a minimal timeout of 1 second.
         */
 
-       ep = getenv("tftpblocksize");
+       ep = env_get("tftpblocksize");
        if (ep != NULL)
                tftp_block_size_option = simple_strtol(ep, NULL, 10);
 
-       ep = getenv("tftptimeout");
+       ep = env_get("tftptimeout");
        if (ep != NULL)
                timeout_ms = simple_strtol(ep, NULL, 10);
 
@@ -720,7 +720,7 @@ void tftp_start(enum proto_t protocol)
                timeout_ms = 1000;
        }
 
-       ep = getenv("tftptimeoutcountmax");
+       ep = env_get("tftptimeoutcountmax");
        if (ep != NULL)
                tftp_timeout_count_max = simple_strtol(ep, NULL, 10);
 
@@ -742,8 +742,8 @@ void tftp_start(enum proto_t protocol)
                        (net_ip.s_addr >> 16) & 0xFF,
                        (net_ip.s_addr >> 24) & 0xFF);
 
-               strncpy(tftp_filename, default_filename, MAX_LEN);
-               tftp_filename[MAX_LEN - 1] = 0;
+               strncpy(tftp_filename, default_filename, DEFAULT_NAME_LEN);
+               tftp_filename[DEFAULT_NAME_LEN - 1] = 0;
 
                printf("*** Warning: no boot file name; using '%s'\n",
                       tftp_filename);
@@ -805,7 +805,9 @@ void tftp_start(enum proto_t protocol)
                printf("Load address: 0x%lx\n", load_addr);
                puts("Loading: *\b");
                tftp_state = STATE_SEND_RRQ;
+#ifdef CONFIG_CMD_BOOTEFI
                efi_set_bootdev("Net", "", tftp_filename);
+#endif
        }
 
        time_start = get_timer(0);
@@ -822,10 +824,10 @@ void tftp_start(enum proto_t protocol)
        tftp_our_port = 1024 + (get_timer(0) % 3072);
 
 #ifdef CONFIG_TFTP_PORT
-       ep = getenv("tftpdstp");
+       ep = env_get("tftpdstp");
        if (ep != NULL)
                tftp_remote_port = simple_strtol(ep, NULL, 10);
-       ep = getenv("tftpsrcp");
+       ep = env_get("tftpsrcp");
        if (ep != NULL)
                tftp_our_port = simple_strtol(ep, NULL, 10);
 #endif