public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/2] env: setenv add resolve value option
@ 2021-11-19  4:36 Artem Lapkin
  2021-11-19  4:36 ` [PATCH v2 1/2] " Artem Lapkin
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Artem Lapkin @ 2021-11-19  4:36 UTC (permalink / raw)
  To: sjg
  Cc: trini, marek.behun, narmstrong, twarren, andre.przywara, u-boot,
	u-boot-amlogic, christianshewitt, art, nick, gouwa

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..." */

Artem Lapkin (2):
  env: setenv add resolve value option
  test: env: deep resolve value testing

---
V2 changes:
_ fix comments style
_ add comment include/exports.h
_ remake strcpy to strdup
_ env_resolve minimize
_ test added: test/py/tests/test_env.py: test_env_resovle
---

 cmd/nvedit.c              | 43 ++++++++++++++++++++++++++++++++++++++-
 include/_exports.h        |  1 +
 include/env.h             | 11 ++++++++++
 include/exports.h         |  2 ++
 test/py/tests/test_env.py | 24 ++++++++++++++++++++++
 5 files changed, 80 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-04-08 13:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19  4:36 [PATCH v2 0/2] env: setenv add resolve value option Artem Lapkin
2021-11-19  4:36 ` [PATCH v2 1/2] " Artem Lapkin
2021-11-25  0:13   ` Simon Glass
2022-04-07 18:05   ` Tom Rini
2022-04-08 13:09     ` Sean Anderson
2022-04-08 13:11       ` Tom Rini
2021-11-19  4:36 ` [PATCH v2 2/2] test: env: deep resolve value testing Artem Lapkin
2021-11-25  0:13   ` Simon Glass
2021-11-19  7:48 ` [PATCH v2 0/2] env: setenv add resolve value option Wolfgang Denk
2021-11-19  9:06   ` Art Nikpal
2021-11-20 12:36     ` Wolfgang Denk
2021-11-22  8:25       ` Art Nikpal
     [not found]     ` <6198ebca.1c69fb81.fc50c.bf0bSMTPIN_ADDED_BROKEN@mx.google.com>
2021-11-22  8:09       ` Art Nikpal
2021-11-22  8:51         ` Wolfgang Denk
2021-11-22 10:06           ` Art Nikpal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox