]> Git Repo - J-u-boot.git/commitdiff
env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set
authorMarek Vasut <[email protected]>
Tue, 7 Jul 2020 18:51:33 +0000 (20:51 +0200)
committerTom Rini <[email protected]>
Fri, 31 Jul 2020 14:13:00 +0000 (10:13 -0400)
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
env/flags.c

index b88fe7ba9c8a6b69443e14cea125f9a811bc2886..f7a53775c4420011aa8875a6ebff361c500d8868 100644 (file)
@@ -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:
This page took 0.027736 seconds and 4 git commands to generate.