mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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 <heinrich.schuchardt@canonical.com> Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
This commit is contained in:
committed by
Jerome Forissier
parent
e093a4ecbe
commit
94625af011
@@ -177,6 +177,9 @@ static int store_block(struct wget_ctx *ctx, void *src, u16_t len)
|
|||||||
ctx->daddr += len;
|
ctx->daddr += len;
|
||||||
ctx->size += len;
|
ctx->size += len;
|
||||||
|
|
||||||
|
if (wget_info->silent)
|
||||||
|
return 0;
|
||||||
|
|
||||||
pos = clamp(ctx->size, 0UL, ctx->content_len);
|
pos = clamp(ctx->size, 0UL, ctx->content_len);
|
||||||
|
|
||||||
while (ctx->hash_count < pos * 50 / 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 */
|
/* Print hash marks for the last packet received */
|
||||||
while (ctx->hash_count < 49) {
|
if (!wget_info->silent) {
|
||||||
putc('#');
|
while (ctx->hash_count < 49) {
|
||||||
ctx->hash_count++;
|
putc('#');
|
||||||
|
ctx->hash_count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed = get_timer(ctx->start_time);
|
elapsed = get_timer(ctx->start_time);
|
||||||
|
|||||||
Reference in New Issue
Block a user