diff options
author | Marek Vasut <marex@denx.de> | 2020-07-07 20:51:33 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-31 10:13:00 -0400 |
commit | 0f036bf4b87e6416f5c4d23865a62a62d9073c20 (patch) | |
tree | aafa5b2cfdeaa41f069559ef8809d8eae83a6f7e /env | |
parent | ef5cc2e5c6f0fe36832230c23aa2e2d8c0764caf (diff) | |
download | u-boot-0f036bf4b87e6416f5c4d23865a62a62d9073c20.tar.gz u-boot-0f036bf4b87e6416f5c4d23865a62a62d9073c20.tar.bz2 u-boot-0f036bf4b87e6416f5c4d23865a62a62d9073c20.zip |
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>
Diffstat (limited to 'env')
-rw-r--r-- | env/flags.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/env/flags.c b/env/flags.c index b88fe7ba9c..f7a53775c4 100644 --- a/env/flags.c +++ b/env/flags.c @@ -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: |