diff options
| author | Heinrich Schuchardt <[email protected]> | 2026-04-28 20:14:32 +0200 |
|---|---|---|
| committer | Jerome Forissier <[email protected]> | 2026-05-06 11:07:22 +0200 |
| commit | 4877a07ed3cf75fd6fe1acef0b3140a7b76eb680 (patch) | |
| tree | 5e2332ad09ca1536dea19b5b2605c1145cac8a40 | |
| parent | d6694018eaddefac6aae974f9cec72fd6e58f1bc (diff) | |
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 <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
| -rw-r--r-- | net/lwip/wget.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/lwip/wget.c b/net/lwip/wget.c index 008f3b395e7..b6c25be6115 100644 --- a/net/lwip/wget.c +++ b/net/lwip/wget.c @@ -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, |
