summaryrefslogtreecommitdiff
path: root/common/cmd_net.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-18 17:39:38 +0000
committerwdenk <wdenk>2004-04-18 17:39:38 +0000
commit6e5923851ec5c11a36136abc77160d834537c4dd (patch)
tree1d324917e695bf3aadc0041d220304d07d09027a /common/cmd_net.c
parentc26e454dfc6650428854fa2db3b1ed7f19e0ba0e (diff)
downloadu-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.zip
u-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.tar.gz
u-boot-imx-6e5923851ec5c11a36136abc77160d834537c4dd.tar.bz2
* Cleanup, minor fixes
* Patch by Rune Torgersen, 16 Apr 2004: LBA48 fixes * Patches by Pantelis Antoniou, 16 Apr 2004: - Fix some compile problems; add "once" functionality for the netretry variable
Diffstat (limited to 'common/cmd_net.c')
-rw-r--r--common/cmd_net.c78
1 files changed, 33 insertions, 45 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 85a9023..5989733 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -94,62 +94,50 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_NFS */
-static void netboot_update_env(void)
+static void netboot_update_env (void)
{
- char tmp[22] ;
+ char tmp[22];
- if (NetOurGatewayIP) {
- ip_to_string (NetOurGatewayIP, tmp);
- setenv("gatewayip", tmp);
- }
-
- if (NetOurSubnetMask) {
- ip_to_string (NetOurSubnetMask, tmp);
- setenv("netmask", tmp);
- }
+ if (NetOurGatewayIP) {
+ ip_to_string (NetOurGatewayIP, tmp);
+ setenv ("gatewayip", tmp);
+ }
- if (NetOurHostName[0])
- setenv("hostname", NetOurHostName);
+ if (NetOurSubnetMask) {
+ ip_to_string (NetOurSubnetMask, tmp);
+ setenv ("netmask", tmp);
+ }
- if (NetOurRootPath[0])
- setenv("rootpath", NetOurRootPath);
+ if (NetOurHostName[0])
+ setenv ("hostname", NetOurHostName);
- if (NetOurIP) {
- ip_to_string (NetOurIP, tmp);
- setenv("ipaddr", tmp);
- }
+ if (NetOurRootPath[0])
+ setenv ("rootpath", NetOurRootPath);
- if (NetServerIP) {
- ip_to_string (NetServerIP, tmp);
- setenv("serverip", tmp);
- }
+ if (NetOurIP) {
+ ip_to_string (NetOurIP, tmp);
+ setenv ("ipaddr", tmp);
+ }
- if (NetOurDNSIP) {
- ip_to_string (NetOurDNSIP, tmp);
- setenv("dnsip", tmp);
- }
+ if (NetServerIP) {
+ ip_to_string (NetServerIP, tmp);
+ setenv ("serverip", tmp);
+ }
+ if (NetOurDNSIP) {
+ ip_to_string (NetOurDNSIP, tmp);
+ setenv ("dnsip", tmp);
+ }
#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
- if (NetOurDNS2IP) {
- ip_to_string (NetOurDNS2IP, tmp);
- setenv("dnsip2", tmp);
- }
+ if (NetOurDNS2IP) {
+ ip_to_string (NetOurDNS2IP, tmp);
+ setenv ("dnsip2", tmp);
+ }
#endif
-
- if (NetOurNISDomain[0])
- setenv("domain", NetOurNISDomain);
-
- if (ntohs(NetOurVLAN) != (ushort)-1) {
- VLAN_to_string(NetOurVLAN, tmp);
- setenv("vlan", tmp);
- }
-
- if (ntohs(NetOurNativeVLAN) != (ushort)-1) {
- VLAN_to_string(NetOurNativeVLAN, tmp);
- setenv("vlan", tmp);
- }
-
+ if (NetOurNISDomain[0])
+ setenv ("domain", NetOurNISDomain);
}
+
static int
netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
{