From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>, u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
Alexander Graf <agraf@csgraf.de>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jerome Forissier <jerome@forissier.org>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Peng Fan <peng.fan@nxp.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>
Subject: Re: [PATCH 1/3] gunzip: Add ability to disable progress indicator
Date: Thu, 29 Jan 2026 17:17:19 +0100 [thread overview]
Message-ID: <87wm10mm0g.fsf@kernel.org> (raw)
In-Reply-To: <20260127235914.1503663-1-marek.vasut+renesas@mailbox.org>
Hi Marek,
Thank you for the patch.
On Wed, Jan 28, 2026 at 00:57, Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:
> 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;
I've tried to test the series with:
$ ./test/py/test.py --bd sandbox --build -k ut
(I know ut might not the right filter for this test, but I always test 'ut'
before testing other things)
But I see:
+make O=/var/home/mkorpershoek/work/upstream/u-boot/build-sandbox -s sandbox_defconfig
+make O=/var/home/mkorpershoek/work/upstream/u-boot/build-sandbox -s -j14
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
ld: warning: enabling an executable stack because of -z execstack command line option
../lib/gunzip.c: In function ‘gzwrite_progress_init’:
../lib/gunzip.c:91:17: error: implicit declaration of function ‘env_get_yesno’ [-Wimplicit-function-declaration]
91 | quiet = env_get_yesno("gzwrite_quiet") == 1;
| ^~~~~~~~~~~~~
make[2]: *** [../scripts/Makefile.build:271: lib/gunzip.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/var/home/mkorpershoek/work/upstream/u-boot/Makefile:2191: lib] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:189: __sub-make] Error 2
Adding env.h inclusion as following fixes it:
diff --git a/lib/gunzip.c b/lib/gunzip.c
index ed05f1d64d7d..98acf4c5b2a7 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <console.h>
#include <div64.h>
+#include <env.h>
#include <gzip.h>
#include <image.h>
#include <malloc.h>
Maybe this should be included conditionally depending on the command
being enabled or not?
> +
> + 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
next prev parent reply other threads:[~2026-01-29 16:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Mattijs Korpershoek [this message]
2026-01-29 16:33 ` [PATCH 1/3] gunzip: Add ability to disable progress indicator 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wm10mm0g.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=agraf@csgraf.de \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome@forissier.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=neil.armstrong@linaro.org \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=yuya.hamamachi.sx@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.