aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:09 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:22:18 -0400
commit382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch)
tree8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /net
parent01510091de905c46620757b9027b2e55c4b3b313 (diff)
downloadu-boot-382bee57f19b4454e2015bc19a010bc2d0ab9337.zip
u-boot-382bee57f19b4454e2015bc19a010bc2d0ab9337.tar.gz
u-boot-382bee57f19b4454e2015bc19a010bc2d0ab9337.tar.bz2
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 'net')
-rw-r--r--net/arp.c2
-rw-r--r--net/bootp.c2
-rw-r--r--net/dns.c2
-rw-r--r--net/eth_common.c6
4 files changed, 6 insertions, 6 deletions
diff --git a/net/arp.c b/net/arp.c
index f3ceff9..4c79e09 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -194,7 +194,7 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
if (net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) {
char buf[20];
sprintf(buf, "%pM", &arp->ar_sha);
- setenv("serveraddr", buf);
+ env_set("serveraddr", buf);
}
#endif
diff --git a/net/bootp.c b/net/bootp.c
index be8f710..5795156 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -170,7 +170,7 @@ static void store_net_params(struct bootp_hdr *bp)
* not contain a new value
*/
if (*net_boot_file_name)
- setenv("bootfile", net_boot_file_name);
+ env_set("bootfile", net_boot_file_name);
#endif
net_copy_ip(&net_ip, &bp->bp_yiaddr);
}
diff --git a/net/dns.c b/net/dns.c
index 7017bac..eee8a02 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -184,7 +184,7 @@ static void dns_handler(uchar *pkt, unsigned dest, struct in_addr sip,
ip_to_string(ip_addr, ip_str);
printf("%s\n", ip_str);
if (net_dns_env_var)
- setenv(net_dns_env_var, ip_str);
+ env_set(net_dns_env_var, ip_str);
} else {
puts("server responded with invalid IP number\n");
}
diff --git a/net/eth_common.c b/net/eth_common.c
index 58fa295..ef97da7 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -39,7 +39,7 @@ int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
sprintf(buf, "%pM", enetaddr);
- return setenv(name, buf);
+ return env_set(name, buf);
}
int eth_getenv_enetaddr_by_index(const char *base_name, int index,
@@ -97,14 +97,14 @@ void eth_current_changed(void)
/* update current ethernet name */
if (eth_get_dev()) {
if (act == NULL || strcmp(act, eth_get_name()) != 0)
- setenv("ethact", eth_get_name());
+ env_set("ethact", eth_get_name());
}
/*
* remove the variable completely if there is no active
* interface
*/
else if (act != NULL)
- setenv("ethact", NULL);
+ env_set("ethact", NULL);
}
void eth_try_another(int first_restart)