Hi,

On Fri, 29 Oct 2021 at 03:03, Pali Rohár <p...@kernel.org> wrote:
>
> On Thursday 28 October 2021 21:17:38 Simon Glass wrote:
> > Hi Marek,
> >
> > On Wed, 27 Oct 2021 at 21:28, Marek Behún <ka...@kernel.org> wrote:
> > >
> > > From: Marek Behún <marek.be...@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.be...@nic.cz>
> > > ---
> > >  env/common.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Reviewed-by: Simon Glass <s...@chromium.org>
> >
> > But it isn't normally possible to set an env var to an empty string.
> > How does this happen?
>
> IIRC you can set variable to empty string via e.g.:
>
> setenv abc ''

Yes that works and I now see you are all right. In fact the command
handling for 'env set' does not use env_set().

It seems a bit inconsistent to me. Since a deleted variable is
considered empty, do we need to support empty vars?

Regards,
Simon

Reply via email to