diff options
Diffstat (limited to 'env')
-rw-r--r-- | env/Kconfig | 1 | ||||
-rw-r--r-- | env/env.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/env/Kconfig b/env/Kconfig index c409ea7..6e24eee 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -733,6 +733,7 @@ config ENV_APPEND config ENV_WRITEABLE_LIST bool "Permit write access only to listed variables" + select ENV_APPEND help If defined, only environment variables which explicitly set the 'w' writeable flag can be written and modified at runtime. No variables @@ -192,6 +192,14 @@ int env_load(void) int best_prio = -1; int prio; + if (CONFIG_IS_ENABLED(ENV_WRITEABLE_LIST)) { + /* + * When using a list of writeable variables, the baseline comes + * from the built-in default env. So load this first. + */ + env_set_default(NULL, 0); + } + for (prio = 0; (drv = env_driver_lookup(ENVOP_LOAD, prio)); prio++) { int ret; |