diff options
author | Tom Rini <trini@konsulko.com> | 2019-08-12 18:46:07 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-12 18:46:07 -0400 |
commit | 5939afc9611e8ba4a86b96e67670b765ee27668e (patch) | |
tree | 369402e0305a7b8f9f905baec6387bfd9683ba71 /env/flags.c | |
parent | d7ae932152ddf58125a05f4eb28596d9b31bdb1e (diff) | |
parent | ec1fa18561f818bee252da2c331d371ad26037d2 (diff) |
Merge branch '2019-08-11-master-imports'
- environment cleanup
- HiKey 960 support
- Some PCI fixes
Diffstat (limited to 'env/flags.c')
-rw-r--r-- | env/flags.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/env/flags.c b/env/flags.c index 79dccc05fe2..418d6cc7425 100644 --- a/env/flags.c +++ b/env/flags.c @@ -4,6 +4,7 @@ * Joe Hershberger, National Instruments, joe.hershberger@ni.com */ +#include <env.h> #include <linux/string.h> #include <linux/ctype.h> @@ -18,7 +19,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else #include <common.h> -#include <environment.h> +#include <env_internal.h> #endif #ifdef CONFIG_CMD_NET @@ -418,7 +419,7 @@ static const char *flags_list; * This is called specifically when the variable did not exist in the hash * previously, so the blanket update did not find this variable. */ -void env_flags_init(ENTRY *var_entry) +void env_flags_init(struct env_entry *var_entry) { const char *var_name = var_entry->key; char flags[ENV_FLAGS_ATTR_MAX_LEN + 1] = ""; @@ -440,7 +441,7 @@ void env_flags_init(ENTRY *var_entry) * Called on each existing env var prior to the blanket update since removing * a flag in the flag list should remove its flags. */ -static int clear_flags(ENTRY *entry) +static int clear_flags(struct env_entry *entry) { entry->flags = 0; @@ -452,12 +453,12 @@ static int clear_flags(ENTRY *entry) */ static int set_flags(const char *name, const char *value, void *priv) { - ENTRY e, *ep; + struct env_entry e, *ep; e.key = name; e.data = NULL; e.callback = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENV_FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ if (ep != NULL) { @@ -495,8 +496,8 @@ U_BOOT_ENV_CALLBACK(flags, on_flags); * overwriting of write-once variables. */ -int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op, - int flag) +int env_flags_validate(const struct env_entry *item, const char *newval, + enum env_op op, int flag) { const char *name; const char *oldval = NULL; |