[PATCH] cmd: env: Add `indirect` to indirectly set values
Tom Rini
trini at konsulko.com
Fri Apr 8 14:31:05 CEST 2022
On Mon, Dec 20, 2021 at 06:31:56PM -0500, Samuel Dionne-Riel wrote:
> This allows an ergonomic-enough approximation of ${!variable} expansion.
> This could be used the following way:
>
> ```
> for target in ${boot_targets}; do
> env indirect target_name target_name_${target}
> # ...
> done
> ```
>
> Assuming `target_name_mmc0` and similar are set appropriately.
>
> A default value can be optionally provided.
>
> Note: this acts on environment variables, not hush variables.
>
> Signed-off-by: Samuel Dionne-Riel <samuel at dionne-riel.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: "Marek Behún" <marek.behun at nic.cz>
After making this not default y, applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220408/5c558f87/attachment.sig>
More information about the U-Boot
mailing list