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