[PATCH] net: lwip: wget: rework the '#' printing
Marek Vasut
marek.vasut at mailbox.org
Thu Jan 29 15:53:26 CET 2026
On 1/29/26 11:18 AM, Jerome Forissier wrote:
> Hi Marek,
>
> On 29/01/2026 01:23, Marek Vasut wrote:
>> Currently, the LWIP wget command prints excessive amount of progress
>> indicator '#' for very long file downloads,
>
> So true! ;-)
>
>> 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.
>
> That's not one line strictly speaking, it is 50 characters.
> Like I suggested re. your TFTP patch, perhaps a percent-based format
> would be better?
>
> 0%....10%....20%... etc.
I would like to retain as much compatibility with the old network stack
as possible, to make the switch over easy for existing users.
Is there already such a "pretty printing" function available somewhere ?
> In any case:
>
> Acked-by: Jerome Forissier <jerome.forissier at rm.com>
Thank you
(it seems someone rm'd a character from the AB string above, so I
reinstated it according to the source email address)
More information about the U-Boot
mailing list