diff options
author | Krebs, Olaf <Olaf.Krebs@emh-metering.com> | 2020-03-09 17:27:55 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-12 20:17:23 +0300 |
commit | 808f13d8fc38959dc90de7243029141e758a5c0a (patch) | |
tree | 07a17db6b106875a0e031d637b3d33ec913562ee /cmd/net.c | |
parent | f3767bcb31d0ce5c6381d5f6c33a951774ee6d41 (diff) | |
download | u-boot-808f13d8fc38959dc90de7243029141e758a5c0a.tar.xz |
net: Fix error if some network features are disabled
If 'CONFIG_CMD_TFTPBOOT' or 'CONFIG_CMD_BOOTP' are disabled, the usage must be disabled, too!
Signed-off-by: Olaf Krebs <olaf.krebs@emh-metering.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'cmd/net.c')
-rw-r--r-- | cmd/net.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -135,11 +135,15 @@ static void netboot_update_env(void) env_set("netmask", tmp); } +#ifdef CONFIG_CMD_BOOTP if (net_hostname[0]) env_set("hostname", net_hostname); +#endif +#ifdef CONFIG_CMD_BOOTP if (net_root_path[0]) env_set("rootpath", net_root_path); +#endif if (net_ip.s_addr) { ip_to_string(net_ip, tmp); @@ -165,8 +169,10 @@ static void netboot_update_env(void) env_set("dnsip2", tmp); } #endif +#ifdef CONFIG_CMD_BOOTP if (net_nis_domain[0]) env_set("domain", net_nis_domain); +#endif #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_TIMEOFFSET) if (net_ntp_time_offset) { |