]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: lwip/wget: missing linefeed in diagnostic output
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 28 Apr 2026 18:14:32 +0000 (20:14 +0200)
committerJerome Forissier <jerome.forissier@arm.com>
Wed, 6 May 2026 09:07:22 +0000 (11:07 +0200)
With NET_LWIP wget produces this output with an overlong line
and missing white space:

    => wget $kernel_addr_r http://example.com/
    #################################################  4 GiB540 bytes transferred in 2 ms (263.7 KiB/s)
    Bytes transferred = 540 (21c hex)

Removing the condition on inserting a line feed yields:

    => wget $kernel_addr_r http://example.com/
    #################################################  4 GiB
    540 bytes transferred in 2 ms (263.7 KiB/s)
    Bytes transferred = 540 (21c hex)

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
net/lwip/wget.c

index 008f3b395e7c43b6f3c75a0322e3dd7ae9f234c5..b6c25be61152bea7e04dd77b81384d064e9a4c96 100644 (file)
@@ -20,7 +20,6 @@
 #define SERVER_NAME_SIZE 254
 #define HTTP_PORT_DEFAULT 80
 #define HTTPS_PORT_DEFAULT 443
-#define PROGRESS_PRINT_STEP_BYTES (100 * 1024)
 
 enum done_state {
        NOT_DONE = 0,
@@ -251,9 +250,7 @@ static void httpc_result_cb(void *arg, httpc_result_t httpc_result,
        if (!elapsed)
                elapsed = 1;
        if (!wget_info->silent) {
-               if (rx_content_len > PROGRESS_PRINT_STEP_BYTES)
-                       printf("\n");
-               printf("%u bytes transferred in %lu ms (", rx_content_len,
+               printf("\n%u bytes transferred in %lu ms (", rx_content_len,
                       elapsed);
                print_size(rx_content_len / elapsed * 1000, "/s)\n");
                printf("Bytes transferred = %lu (%lx hex)\n", ctx->size,