X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=env%2Fflags.c;h=b88fe7ba9c8a6b69443e14cea125f9a811bc2886;hb=4cc24aeaf420f33f7ee92f76e025a86fc9aaefec;hp=4b0ddb6bb85b2c709040295b75b702763b0612a6;hpb=ceff355a5f3038ddb49618d9adc716b0ed978aea;p=oweals%2Fu-boot.git diff --git a/env/flags.c b/env/flags.c index 4b0ddb6bb8..b88fe7ba9c 100644 --- a/env/flags.c +++ b/env/flags.c @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2012 * Joe Hershberger, National Instruments, joe.hershberger@ni.com - * - * SPDX-License-Identifier: GPL-2.0+ */ +#include #include #include @@ -19,7 +19,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else #include -#include +#include #endif #ifdef CONFIG_CMD_NET @@ -419,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] = ""; @@ -441,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; @@ -453,12 +453,11 @@ 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) { @@ -496,8 +495,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;