[PATCH v2 1/1] net/wget: set filesize

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Oct 9 13:08:54 CEST 2024


After downloading a file with wget the file size may be needed in follow up
actions, e.g.

* write file to device
* calculate hash

Let wget set the environment variable filesize.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
v2:
	rework commit message
---
 net/wget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wget.c b/net/wget.c
index b4251e0f293..c9b8fc9109c 100644
--- a/net/wget.c
+++ b/net/wget.c
@@ -404,6 +404,7 @@ static void wget_handler(uchar *pkt, u16 dport,
 		efi_set_bootdev("Net", "", image_url,
 				map_sysmem(image_load_addr, 0),
 				net_boot_file_size);
+		env_set_hex("filesize", net_boot_file_size);
 		break;
 	}
 }
-- 
2.45.2



More information about the U-Boot mailing list