net: cosmetic: Fixup var names related to boot file
The variables around the bootfile were inconsistent and used CamelCase.
Update them to make the code more readable.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/net/net.c b/net/net.c
index b1b822d..f60998b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -127,8 +127,6 @@
char NetOurHostName[32] = {0,};
/* Our bootpath */
char NetOurRootPath[64] = {0,};
-/* Our bootfile size in blocks */
-ushort NetBootFileSize;
#ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */
struct in_addr net_mcast_addr;
@@ -136,8 +134,6 @@
/** END OF BOOTP EXTENTIONS **/
-/* The actual transferred size of the bootfile (in bytes) */
-ulong NetBootFileXferSize;
/* Our ethernet address */
uchar NetOurEther[6];
/* Boot server enet address */
@@ -174,7 +170,11 @@
ushort NetOurNativeVLAN = 0xFFFF;
/* Boot File name */
-char BootFile[128];
+char net_boot_file_name[128];
+/* The actual transferred size of the bootfile (in bytes) */
+u32 net_boot_file_size;
+/* Boot file size in blocks as reported by the DHCP server */
+u32 net_boot_file_expected_size_in_blocks;
#if defined(CONFIG_CMD_SNTP)
/* NTP server IP address */
@@ -222,7 +222,8 @@
switch (op) {
case env_op_create:
case env_op_overwrite:
- copy_filename(BootFile, value, sizeof(BootFile));
+ copy_filename(net_boot_file_name, value,
+ sizeof(net_boot_file_name));
break;
default:
break;
@@ -380,7 +381,7 @@
case 0:
NetDevExists = 1;
- NetBootFileXferSize = 0;
+ net_boot_file_size = 0;
switch (protocol) {
case TFTPGET:
#ifdef CONFIG_CMD_TFTPPUT
@@ -551,11 +552,10 @@
case NETLOOP_SUCCESS:
net_cleanup_loop();
- if (NetBootFileXferSize > 0) {
- printf("Bytes transferred = %ld (%lx hex)\n",
- NetBootFileXferSize,
- NetBootFileXferSize);
- setenv_hex("filesize", NetBootFileXferSize);
+ if (net_boot_file_size > 0) {
+ printf("Bytes transferred = %d (%x hex)\n",
+ net_boot_file_size, net_boot_file_size);
+ setenv_hex("filesize", net_boot_file_size);
setenv_hex("fileaddr", load_addr);
}
if (protocol != NETCONS)
@@ -565,7 +565,7 @@
eth_set_last_protocol(protocol);
- ret = NetBootFileXferSize;
+ ret = net_boot_file_size;
debug_cond(DEBUG_INT_STATE, "--- NetLoop Success!\n");
goto done;