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>
diff --git a/env/flags.c b/env/flags.c
index b88fe7b..f7a5377 100644
--- a/env/flags.c
+++ b/env/flags.c
@@ -524,8 +524,10 @@
/* 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: