Skip to content
Snippets Groups Projects
Commit 0f036bf4 authored by Marek Vasut's avatar Marek Vasut Committed by Tom Rini
Browse files

env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set


If the ENV_ACCESS_IGNORE_FORCE is set, inform user that the variable
cannot be force-set if such attempt happens.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent ef5cc2e5
No related branches found
No related tags found
No related merge requests found
...@@ -524,8 +524,10 @@ int env_flags_validate(const struct env_entry *item, const char *newval, ...@@ -524,8 +524,10 @@ int env_flags_validate(const struct env_entry *item, const char *newval,
/* check for access permission */ /* check for access permission */
#ifndef CONFIG_ENV_ACCESS_IGNORE_FORCE #ifndef CONFIG_ENV_ACCESS_IGNORE_FORCE
if (flag & H_FORCE) if (flag & H_FORCE) {
printf("## Error: Can't force access to \"%s\"\n", name);
return 0; return 0;
}
#endif #endif
switch (op) { switch (op) {
case env_op_delete: case env_op_delete:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment