diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-02 09:44:18 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-11 16:43:41 -0400 |
commit | dd2408cac1ea0f5e9ab4b07539c6edaee57918cb (patch) | |
tree | 1f797fce88be656b6bafe0feac4bd183402f80dd /env | |
parent | 02cf9334280046e6b07ba304e7da2a273e445d5b (diff) | |
download | u-boot-dd2408cac1ea0f5e9ab4b07539c6edaee57918cb.tar.gz u-boot-dd2408cac1ea0f5e9ab4b07539c6edaee57918cb.tar.bz2 u-boot-dd2408cac1ea0f5e9ab4b07539c6edaee57918cb.zip |
env: Drop the ENTRY typedef
U-Boot is not supposed to use typedef for structs anymore. Also this name
is the same as the ENTRY() macro used in assembler files, and 'entry'
itself is widely used in U-Boot (>8k matches).
Drop the typedef and rename the struct to env_entry to reduce confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'env')
-rw-r--r-- | env/callback.c | 6 | ||||
-rw-r--r-- | env/common.c | 2 | ||||
-rw-r--r-- | env/flags.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/env/callback.c b/env/callback.c index 95be80d454..d539da93aa 100644 --- a/env/callback.c +++ b/env/callback.c @@ -43,7 +43,7 @@ static const char *callback_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_callback_init(ENTRY *var_entry) +void env_callback_init(struct env_entry *var_entry) { const char *var_name = var_entry->key; char callback_name[256] = ""; @@ -80,7 +80,7 @@ void env_callback_init(ENTRY *var_entry) * Called on each existing env var prior to the blanket update since removing * a callback association should remove its callback. */ -static int clear_callback(ENTRY *entry) +static int clear_callback(struct env_entry *entry) { entry->callback = NULL; @@ -92,7 +92,7 @@ static int clear_callback(ENTRY *entry) */ static int set_callback(const char *name, const char *value, void *priv) { - ENTRY e, *ep; + struct env_entry e, *ep; struct env_clbk_tbl *clbkp; e.key = name; diff --git a/env/common.c b/env/common.c index 1d9d0f934d..474ea2280b 100644 --- a/env/common.c +++ b/env/common.c @@ -250,7 +250,7 @@ void env_relocate(void) int env_complete(char *var, int maxv, char *cmdv[], int bufsz, char *buf, bool dollar_comp) { - ENTRY *match; + struct env_entry *match; int found, idx; if (dollar_comp) { diff --git a/env/flags.c b/env/flags.c index 7277711594..fdbad7bf33 100644 --- a/env/flags.c +++ b/env/flags.c @@ -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,7 +453,7 @@ 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; @@ -496,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; |