summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 18:22:09 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-16 12:22:18 (GMT)
commit382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch)
tree8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /common/spl
parent01510091de905c46620757b9027b2e55c4b3b313 (diff)
downloadu-boot-382bee57f19b4454e2015bc19a010bc2d0ab9337.tar.xz
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/Kconfig2
-rw-r--r--common/spl/spl_dfu.c2
-rw-r--r--common/spl/spl_net.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 5176857..3c887b3 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -279,7 +279,7 @@ config SPL_ENV_SUPPORT
configuration. But some boards use this to support 'Falcon' boot
on EXT2 and FAT, where SPL boots directly into Linux without
starting U-Boot first. Enabling this option will make getenv()
- and setenv() available in SPL.
+ and env_set() available in SPL.
config SPL_SAVEENV
bool "Support save environment"
diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c
index e8d0ba1..f5ec0fb 100644
--- a/common/spl/spl_dfu.c
+++ b/common/spl/spl_dfu.c
@@ -46,7 +46,7 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr)
return -EINVAL;
}
- ret = setenv("dfu_alt_info", str_env);
+ ret = env_set("dfu_alt_info", str_env);
if (ret) {
error("unable to set env variable \"dfu_alt_info\"!\n");
return -EINVAL;
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 85fe508..8883109 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -33,14 +33,14 @@ static int spl_net_load_image(struct spl_image_info *spl_image,
env_init();
env_relocate();
- setenv("autoload", "yes");
+ env_set("autoload", "yes");
rv = eth_initialize();
if (rv == 0) {
printf("No Ethernet devices found\n");
return -ENODEV;
}
if (bootdev->boot_device_name)
- setenv("ethact", bootdev->boot_device_name);
+ env_set("ethact", bootdev->boot_device_name);
rv = net_loop(BOOTP);
if (rv < 0) {
printf("Problem booting with BOOTP\n");