diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:12 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:24 -0400 |
commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /net/bootp.c | |
parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) |
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/bootp.c')
-rw-r--r-- | net/bootp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bootp.c b/net/bootp.c index 579515687b..6c869ef856 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -414,7 +414,7 @@ static void bootp_timeout_handler(void) static u8 *add_vci(u8 *e) { char *vci = NULL; - char *env_vci = getenv("bootp_vci"); + char *env_vci = env_get("bootp_vci"); #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING) vci = CONFIG_SPL_NET_VCI_STRING; @@ -488,7 +488,7 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip, *e++ = tmp & 0xff; } #if defined(CONFIG_BOOTP_SEND_HOSTNAME) - hostname = getenv("hostname"); + hostname = env_get("hostname"); if (hostname) { int hostnamelen = strlen(hostname); @@ -503,7 +503,7 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip, clientarch = CONFIG_BOOTP_PXE_CLIENTARCH; #endif - if (getenv("bootp_arch")) + if (env_get("bootp_arch")) clientarch = getenv_ulong("bootp_arch", 16, clientarch); if (clientarch > 0) { @@ -520,7 +520,7 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip, *e++ = 0; /* minor revision */ #ifdef CONFIG_LIB_UUID - uuid = getenv("pxeuuid"); + uuid = env_get("pxeuuid"); if (uuid) { if (uuid_str_valid(uuid)) { @@ -713,7 +713,7 @@ void bootp_request(void) dhcp_state = INIT; #endif - ep = getenv("bootpretryperiod"); + ep = env_get("bootpretryperiod"); if (ep != NULL) time_taken_max = simple_strtoul(ep, NULL, 10); else |