projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arm: sunxi: Enable SPI/SPI-FLASH support for A64
[oweals/u-boot.git]
/
env
/
flags.c
diff --git
a/env/flags.c
b/env/flags.c
index 4b0ddb6bb85b2c709040295b75b702763b0612a6..418d6cc7425a5689164b0d99fa250e3d4d2c9fa2 100644
(file)
--- 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
/*
* (C) Copyright 2012
* Joe Hershberger, National Instruments, joe.hershberger@ni.com
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
*/
+#include <env.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/ctype.h>
@@
-19,7
+19,7
@@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#else
#include <common.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#else
#include <common.h>
-#include <env
ironment
.h>
+#include <env
_internal
.h>
#endif
#ifdef CONFIG_CMD_NET
#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.
*/
* 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] = "";
{
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.
*/
* 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;
{
entry->flags = 0;
@@
-453,12
+453,12
@@
static int clear_flags(ENTRY *entry)
*/
static int set_flags(const char *name, const char *value, void *priv)
{
*/
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;
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) {
/* does the env variable actually exist? */
if (ep != NULL) {
@@
-496,8
+496,8
@@
U_BOOT_ENV_CALLBACK(flags, on_flags);
* overwriting of write-once variables.
*/
* 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;
{
const char *name;
const char *oldval = NULL;