]> git.dujemihanovic.xyz Git - u-boot.git/commit
env: remove vars that are not in default env
authorRavi Minnikanti <rminnikanti@marvell.com>
Sun, 11 Aug 2024 18:44:15 +0000 (11:44 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 15 Aug 2024 17:50:47 +0000 (11:50 -0600)
commit2a521d01e62c012f627d426a4c43082b6402928d
treeafba443f98d983bd7055818e4d8aed761ea8454f
parentdbb6b5a01098ea2b981cc35d21edd52d33b03f50
env: remove vars that are not in default env

current env_set_default_vars() doesn't delete
var that are not in the imported env. hashtable
removes vars that are not in the imported
env but present in the current env only if H_NOCLEAR
flag is not set.

This change is to avoid passing H_NOCLEAR flag if
specific vars are passed to env_set_default_vars()

Without this change:
Marvell>> env default boot_mode
Marvell>>

With the change:
Marvell>> env default boot_mode
WARNING: 'boot_mode' not in imported env, deleting it!

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
doc/usage/cmd/env.rst
env/common.c
test/env/cmd_ut_env.c