[PATCH v1] env: setenv add resolve value option

Art Nikpal email2tema at gmail.com
Wed Nov 3 08:41:32 CET 2021


> The high level problem I have with this patch is that we keep going back
> to "we really need to update to a modern hush (or other shell) rather
> than patching new features in to our ancient fork".

Yes it will be fine ! Does anybody have information about these plans ?
but in any case my patch didn't broke  compatibility like next patch

> See also this old patch:
> https://patchwork.ozlabs.org/project/uboot/patch/1449255744-25787-1-git-send-email-nm@ti.com/

> Can you please add to the env tests?
> please add function comment
> ...

tnx for suggestions ...
i can make v2 variant for my patch , if no one is against this idea

On Wed, Nov 3, 2021 at 12:44 AM Tom Rini <trini at konsulko.com> wrote:
>
> On Tue, Nov 02, 2021 at 03:19:14PM +0800, Artem Lapkin wrote:
>
> > Add possibility setup env variable with additional resolving vars inside
> > value.
> >
> > Usage examples
> >
> > => setenv a hello
> > => setenv b world
> > => setenv c '${a} ${b}'
> > => setenv -r d '${c}! ${a}...'
> > => printenv d
> > d=hello world! hello...
> >
> > /* internal usage example */
> > env_resolve("d", "${c}! ${a}...");
> > /* d="hello world! hello..." */
> >
> > Notes
> >
> > Resolving works only for ${var} "bracket" and didn't workd for
> > "unbracket" $var
> >
> > => setenv -r d '$c! $a...'
> > => printenv d
> > d=$c! $a...
> >
> > Signed-off-by: Artem Lapkin <art at khadas.com>
>
> The high level problem I have with this patch is that we keep going back
> to "we really need to update to a modern hush (or other shell) rather
> than patching new features in to our ancient fork".
>
> --
> Tom


More information about the U-Boot mailing list