public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/3] gunzip: Add ability to disable progress indicator
@ 2026-01-27 23:57 Marek Vasut
  2026-01-27 23:57 ` [PATCH 2/3] configs: sandbox: Enable zip command Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Marek Vasut @ 2026-01-27 23:57 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Alexander Graf, Heinrich Schuchardt,
	Ilias Apalodimas, Jerome Forissier, Mattijs Korpershoek,
	Neil Armstrong, Peng Fan, Quentin Schulz, Simon Glass, Tom Rini,
	Yuya Hamamachi

Introduce new environment variable, 'gzwrite_quiet', which disables
the progress indicator during decompress-write. This is mainly meant
to prevent disturbing unit test which responds badly to the in-place
progress update and reduce UART traffic. By default, the indicator is
left enabled.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Alexander Graf <agraf@csgraf.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Jerome Forissier <jerome@forissier.org>
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Quentin Schulz <quentin.schulz@cherry.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>
Cc: u-boot@lists.denx.de
---
 lib/gunzip.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/gunzip.c b/lib/gunzip.c
index 040450c0e79..d31bbb2ba03 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -83,10 +83,15 @@ __rcode int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *len
 }
 
 #ifdef CONFIG_CMD_UNZIP
+static bool quiet;
+
 __weak
 void gzwrite_progress_init(ulong expectedsize)
 {
-	putc('\n');
+	quiet = env_get_yesno("gzwrite_quiet") == 1;
+
+	if (!quiet)
+		putc('\n');
 }
 
 __weak
@@ -94,7 +99,7 @@ void gzwrite_progress(int iteration,
 		     ulong bytes_written,
 		     ulong total_bytes)
 {
-	if (0 == (iteration & 3))
+	if (!quiet && !(iteration & 3))
 		printf("%lu/%lu\r", bytes_written, total_bytes);
 }
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-01-29 19:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 23:57 [PATCH 1/3] gunzip: Add ability to disable progress indicator Marek Vasut
2026-01-27 23:57 ` [PATCH 2/3] configs: sandbox: Enable zip command Marek Vasut
2026-01-29 16:17   ` Mattijs Korpershoek
2026-01-27 23:57 ` [PATCH 3/3] test: cmd: Add test for zip/unzip/gzwrite commands Marek Vasut
2026-01-29 16:26   ` Mattijs Korpershoek
2026-01-29 16:31     ` Marek Vasut
2026-01-29 19:34       ` Mattijs Korpershoek
2026-01-29 19:43         ` Marek Vasut
2026-01-29 16:17 ` [PATCH 1/3] gunzip: Add ability to disable progress indicator Mattijs Korpershoek
2026-01-29 16:33   ` Marek Vasut
2026-01-29 16:53     ` Tom Rini
2026-01-29 16:57       ` Marek Vasut
2026-01-29 17:16         ` Tom Rini
2026-01-29 17:25           ` Marek Vasut
2026-01-29 19:21     ` Mattijs Korpershoek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox