[PATCH v2 0/2] env: setenv add resolve value option
Artem Lapkin
email2tema at gmail.com
Fri Nov 19 05:36:45 CET 2021
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
More information about the U-Boot
mailing list