diff options
author | Tom Rini <trini@konsulko.com> | 2020-01-20 12:23:33 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-20 12:23:33 -0500 |
commit | c7819d409ab7671991bf906482b7adcc21266f75 (patch) | |
tree | eab7a9eba205f31dd1f4b606ec58d64ec5e933f1 /net/tftp.c | |
parent | c8a1198665b81113535e89c791a7991abe481d62 (diff) | |
parent | addc376318d765902027021d88f693e95d1e1bcd (diff) |
Merge branch '2020-01-17-reduce-size-of-common-h-even-more'
- Bring in Simon Glass's series that reduces what we have in <common.h>
even more.
Diffstat (limited to 'net/tftp.c')
-rw-r--r-- | net/tftp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/tftp.c b/net/tftp.c index 1e3c18ae69..02401898c5 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -10,6 +10,7 @@ #include <command.h> #include <efi_loader.h> #include <env.h> +#include <image.h> #include <mapmem.h> #include <net.h> #include <net/tftp.h> @@ -221,7 +222,7 @@ static int load_block(unsigned block, uchar *dst, unsigned len) ulong tosend = len; tosend = min(net_boot_file_size - offset, tosend); - (void)memcpy(dst, (void *)(save_addr + offset), tosend); + (void)memcpy(dst, (void *)(image_save_addr + offset), tosend); debug("%s: block=%d, offset=%ld, len=%d, tosend=%ld\n", __func__, block, offset, len, tosend); return tosend; @@ -605,7 +606,7 @@ static void tftp_timeout_handler(void) } } -/* Initialize tftp_load_addr and tftp_load_size from load_addr and lmb */ +/* Initialize tftp_load_addr and tftp_load_size from image_load_addr and lmb */ static int tftp_init_load_addr(void) { #ifdef CONFIG_LMB @@ -614,13 +615,13 @@ static int tftp_init_load_addr(void) lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob); - max_size = lmb_get_free_size(&lmb, load_addr); + max_size = lmb_get_free_size(&lmb, image_load_addr); if (!max_size) return -1; tftp_load_size = max_size; #endif - tftp_load_addr = load_addr; + tftp_load_addr = image_load_addr; return 0; } @@ -710,9 +711,9 @@ void tftp_start(enum proto_t protocol) #ifdef CONFIG_CMD_TFTPPUT tftp_put_active = (protocol == TFTPPUT); if (tftp_put_active) { - printf("Save address: 0x%lx\n", save_addr); - printf("Save size: 0x%lx\n", save_size); - net_boot_file_size = save_size; + printf("Save address: 0x%lx\n", image_save_addr); + printf("Save size: 0x%lx\n", image_save_size); + net_boot_file_size = image_save_size; puts("Saving: *\b"); tftp_state = STATE_SEND_WRQ; new_transfer(); |