]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net/wget: set filesize
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 9 Oct 2024 11:08:54 +0000 (13:08 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 15 Oct 2024 17:38:44 +0000 (11:38 -0600)
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@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
net/wget.c

index b4251e0f29363a1191cb2d853e31391ff11975db..c9b8fc9109cdbbe8c9df9ab822de3fe64e418133 100644 (file)
@@ -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;
        }
 }