net: lwip/wget: missing linefeed in diagnostic output

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>
This commit is contained in:
Heinrich Schuchardt
2026-04-28 20:14:32 +02:00
committed by Jerome Forissier
parent d6694018ea
commit 4877a07ed3

View 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,