projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Drop init.h from common header
[oweals/u-boot.git]
/
cmd
/
setexpr.c
diff --git
a/cmd/setexpr.c
b/cmd/setexpr.c
index e7194fc4f4137a1652250c0de047200aed75469c..0182f1993846cdb4f6d027c6ddf7e6707d7b2d99 100644
(file)
--- a/
cmd/setexpr.c
+++ b/
cmd/setexpr.c
@@
-1,8
+1,7
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2008 Freescale Semiconductor, Inc.
* Copyright 2013 Wolfgang Denk <wd@denx.de>
/*
* Copyright 2008 Freescale Semiconductor, Inc.
* Copyright 2013 Wolfgang Denk <wd@denx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-12,6
+11,7
@@
#include <common.h>
#include <config.h>
#include <command.h>
#include <common.h>
#include <config.h>
#include <command.h>
+#include <env.h>
#include <mapmem.h>
static ulong get_arg(char *s, int w)
#include <mapmem.h>
static ulong get_arg(char *s, int w)
@@
-145,7
+145,7
@@
static int regex_sub(const char *name,
}
if (t == NULL) {
}
if (t == NULL) {
- value =
getenv
(name);
+ value =
env_get
(name);
if (value == NULL) {
printf("## Error: variable \"%s\" not defined\n", name);
if (value == NULL) {
printf("## Error: variable \"%s\" not defined\n", name);
@@
-282,11
+282,11
@@
static int regex_sub(const char *name,
if (!global)
break;
}
if (!global)
break;
}
- debug("## FINAL (now
setenv
()) : %s\n", data);
+ debug("## FINAL (now
env_set
()) : %s\n", data);
printf("%s=%s\n", name, data);
printf("%s=%s\n", name, data);
- return
setenv
(name, data);
+ return
env_set
(name, data);
}
#endif
}
#endif
@@
-314,7
+314,7
@@
static int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* plain assignment: "setexpr name value" */
if (argc == 3) {
/* plain assignment: "setexpr name value" */
if (argc == 3) {
-
setenv
_hex(argv[1], a);
+
env_set
_hex(argv[1], a);
return 0;
}
return 0;
}
@@
-370,7
+370,7
@@
static int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
}
return 1;
}
-
setenv
_hex(argv[1], value);
+
env_set
_hex(argv[1], value);
return 0;
}
return 0;
}