mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Wadim Egorov <w.egorov@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH] net: dhcp: Fix CONFIG_ENVIRONMENT_VARIABLES check
Date: Fri, 5 Jun 2015 10:43:20 +0200	[thread overview]
Message-ID: <1433493800-23732-1-git-send-email-w.egorov@phytec.de> (raw)

Please squash this patch into
[PATCH v3 2/3] net: dhcp: Split dhcp funcionality & add dhcp command

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 net/dhcp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/dhcp.c b/net/dhcp.c
index eb4bb38..e1625ec 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -141,7 +141,7 @@ static void env_ip_handle(struct dhcp_opt *opt, unsigned char *popt, int optlen)
 	IPaddr_t ip;
 
 	ip = net_read_ip(popt);
-	if (IS_ENABLED(ENVIRONMENT_VARIABLES))
+	if (IS_ENABLED(CONFIG_ENVIRONMENT_VARIABLES))
 		setenv_ip(opt->barebox_var_name, ip);
 }
 
@@ -262,7 +262,7 @@ static int dhcp_set_string_options(struct dhcp_param *param, u8 *e)
 	int str_len;
 	char* str = param->data;
 
-	if (!str && param->barebox_var_name && IS_ENABLED(ENVIRONMENT_VARIABLES))
+	if (!str && param->barebox_var_name && IS_ENABLED(CONFIG_ENVIRONMENT_VARIABLES))
 		str = (char*)getenv(param->barebox_var_name);
 
 	if (!str && param->barebox_dhcp_global && IS_ENABLED(CONFIG_GLOBALVAR))
@@ -390,7 +390,7 @@ static void bootp_copy_net_params(struct bootp *bp)
 		net_set_serverip(tmp_ip);
 
 	if (strlen(bp->bp_file) > 0) {
-		if (IS_ENABLED(ENVIRONMENT_VARIABLES))
+		if (IS_ENABLED(CONFIG_ENVIRONMENT_VARIABLES))
 			setenv("bootfile", bp->bp_file);
 		if (IS_ENABLED(CONFIG_GLOBALVAR))
 			dhcp_set_barebox_global("bootfile", bp->bp_file);
@@ -652,7 +652,7 @@ static void dhcp_reset_env(void)
 		if (!opt->barebox_var_name || opt->copy_only_if_valid)
 			continue;
 
-		if (IS_ENABLED(ENVIRONMENT_VARIABLES))
+		if (IS_ENABLED(CONFIG_ENVIRONMENT_VARIABLES))
 			setenv(opt->barebox_var_name, "");
 		if (opt->barebox_dhcp_global && IS_ENABLED(CONFIG_GLOBALVAR))
 			dhcp_set_barebox_global(opt->barebox_dhcp_global, "");
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-06-05  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05  8:43 Wadim Egorov [this message]
2015-06-05 11:33 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433493800-23732-1-git-send-email-w.egorov@phytec.de \
    --to=w.egorov@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox