1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
Simon Glass
2019-08-02 09:44:18 -06:00
committed by Tom Rini
parent 02cf933428
commit dd2408cac1
11 changed files with 62 additions and 58 deletions

10
env/flags.c vendored
View File

@@ -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;