[PATCH 2/5] env: Fix env_get() when returning empty string using env_get_f()
Marek Behún
kabel at kernel.org
Fri Oct 29 10:51:27 CEST 2021
On Thu, 28 Oct 2021 21:17:38 -0600
Simon Glass <sjg at chromium.org> wrote:
> Hi Marek,
>
> On Wed, 27 Oct 2021 at 21:28, Marek Behún <kabel at kernel.org> wrote:
> >
> > From: Marek Behún <marek.behun at nic.cz>
> >
> > The env_get_f() function returns -1 on failure. Returning 0 means that
> > the variable exists, and is empty string.
> >
> > Signed-off-by: Marek Behún <marek.behun at nic.cz>
> > ---
> > env/common.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> But it isn't normally possible to set an env var to an empty string.
> How does this happen?
Hmm, I don't see code in cmd/nvedit.c's _do_env_set() that would
prohibit empty string as value...
Why isn't it possible?
More information about the U-Boot
mailing list