mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
ef5cc2e5c6
commit
0f036bf4b8
1 changed files with 3 additions and 1 deletions
4
env/flags.c
vendored
4
env/flags.c
vendored
|
@ -524,8 +524,10 @@ int env_flags_validate(const struct env_entry *item, const char *newval,
|
|||
|
||||
/* check for access permission */
|
||||
#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;
|
||||
}
|
||||
#endif
|
||||
switch (op) {
|
||||
case env_op_delete:
|
||||
|
|
Loading…
Reference in a new issue