summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <[email protected]>2026-04-28 20:14:34 +0200
committerJerome Forissier <[email protected]>2026-05-06 11:07:22 +0200
commit94625af0119dd7d6fc809ccf4d6e277fe2a4b242 (patch)
treec3e920eb2267c420c9f8638ee7d27d2ba67c7e13
parente093a4ecbe0a74083b1baf16ef7c67fcddc437db (diff)
net: lwip/wget: don't print progress bar when silent
When the EFI sub-system request to silence output, do not output a progress bar. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
-rw-r--r--net/lwip/wget.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/lwip/wget.c b/net/lwip/wget.c
index 983abe2ccd3..502c0faebb2 100644
--- a/net/lwip/wget.c
+++ b/net/lwip/wget.c
@@ -177,6 +177,9 @@ static int store_block(struct wget_ctx *ctx, void *src, u16_t len)
ctx->daddr += len;
ctx->size += len;
+ if (wget_info->silent)
+ return 0;
+
pos = clamp(ctx->size, 0UL, ctx->content_len);
while (ctx->hash_count < pos * 50 / ctx->content_len) {
@@ -239,9 +242,11 @@ static void httpc_result_cb(void *arg, httpc_result_t httpc_result,
}
/* Print hash marks for the last packet received */
- while (ctx->hash_count < 49) {
- putc('#');
- ctx->hash_count++;
+ if (!wget_info->silent) {
+ while (ctx->hash_count < 49) {
+ putc('#');
+ ctx->hash_count++;
+ }
}
elapsed = get_timer(ctx->start_time);