]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: lwip: wget: rework the '#' printing
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 29 Jan 2026 00:23:29 +0000 (01:23 +0100)
committerJerome Forissier <jerome.forissier@arm.com>
Fri, 6 Feb 2026 15:42:45 +0000 (16:42 +0100)
commit68a8f0f1f34dde836609bf34506d32bfdb2b1f6e
treea9b8e4b21ebd0ae3eb8542ef3b2fdb8c28871951
parent337f50bad2ac8e1db126e4f6d372a3186bba2893
net: lwip: wget: rework the '#' printing

Currently, the LWIP wget command prints excessive amount of progress
indicator '#' for very long file downloads, limit this to one line
that scales according to transfer size.

The HTTP server does report the size of the entire file in protocol
headers, which are received before the actual data transfer. Cache
this information and use it to adaptively print progress indicator
'#' until it fills one entire line worth of '#', which indicates the
transfer has completed. This way, long transfers don't print pages of
'#', but every transfer will print exactly one line worth of '#'. The
algorithm for '#' printing is the same as TFTP tsize one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Jerome Forissier <jerome.forissier@rm.com>
net/lwip/wget.c