[PATCH 1/3] net: lwip/wget: missing linefeed in diagnostic output
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Tue Apr 28 20:14:32 CEST 2026
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 at canonical.com>
---
net/lwip/wget.c | 5 +----
1 file changed, 1 insertion(+), 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,
--
2.53.0
More information about the U-Boot
mailing list