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>
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) {
}
/* 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);