mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
net: lwip: tftp: update image_load_addr after successful transfer
do_tftpb() parses the load address into a local variable laddr but
never updates the global image_load_addr. Commands that rely on
image_load_addr as their default address (e.g. 'bmp info')
therefore operate on the wrong address when called without
an explicit argument after tftpboot.
Update image_load_addr to laddr only on a successful transfer, so
that it accurately reflects where data was actually loaded.
Fixes: 4d4d783812 ("net: lwip: add TFTP support and tftpboot command")
Signed-off-by: Pranav Sanwal <pranav.sanwal@amd.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
This commit is contained in:
committed by
Jerome Forissier
parent
1fc34e1bb8
commit
44c7f95987
@@ -368,6 +368,8 @@ int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
|
||||
if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0)
|
||||
ret = CMD_RET_FAILURE;
|
||||
else
|
||||
image_load_addr = laddr;
|
||||
out:
|
||||
if (arg != net_boot_file_name)
|
||||
free(arg);
|
||||
|
||||
Reference in New Issue
Block a user