From patchwork Wed Jun 3 00:01:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 241584 List-Id: U-Boot discussion From: marex at denx.de (Marek Vasut) Date: Wed, 3 Jun 2020 02:01:06 +0200 Subject: [PATCH 1/6] env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set Message-ID: <20200603000111.7919-1-marex@denx.de> 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 Reviewed-by: Tom Rini --- env/flags.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: