net/: Remove lingering references to CFG_CMD_* symbols.

Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
master
Jon Loeliger 17 years ago
parent 9025317883
commit 610f2e9c28
  1. 18
      net/bootp.c
  2. 8
      net/net.c
  3. 2
      net/rarp.c
  4. 2
      net/tftp.c

@ -81,7 +81,7 @@ extern u8 *dhcp_vendorex_prep (u8 *e); /*rtn new e after add own opts. */
extern u8 *dhcp_vendorex_proc (u8 *e); /*rtn next e if mine,else NULL */ extern u8 *dhcp_vendorex_proc (u8 *e); /*rtn next e if mine,else NULL */
#endif #endif
#endif /* CFG_CMD_DHCP */ #endif
static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len) static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len)
{ {
@ -357,7 +357,7 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
TftpStart(); TftpStart();
} }
#endif /* !CFG_CMD_DHCP */ #endif
/* /*
* Timeout on BOOTP/DHCP request. * Timeout on BOOTP/DHCP request.
@ -491,7 +491,7 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R
return e - start; return e - start;
} }
#else /* CFG_CMD_DHCP */ #else
/* /*
* Warning: no field size check - change CONFIG_BOOTP_* at your own risk! * Warning: no field size check - change CONFIG_BOOTP_* at your own risk!
*/ */
@ -513,7 +513,7 @@ static int BootpExtended (u8 * e)
*e++ = 2; *e++ = 2;
*e++ = (576 - 312 + OPT_SIZE) >> 16; *e++ = (576 - 312 + OPT_SIZE) >> 16;
*e++ = (576 - 312 + OPT_SIZE) & 0xff; *e++ = (576 - 312 + OPT_SIZE) & 0xff;
#endif /* CFG_CMD_DHCP */ #endif
#if defined(CONFIG_BOOTP_SUBNETMASK) #if defined(CONFIG_BOOTP_SUBNETMASK)
*e++ = 1; /* Subnet mask request */ *e++ = 1; /* Subnet mask request */
@ -561,7 +561,7 @@ static int BootpExtended (u8 * e)
return e - start; return e - start;
} }
#endif /* CFG_CMD_DHCP */ #endif
void void
BootpRequest (void) BootpRequest (void)
@ -682,7 +682,7 @@ BootpRequest (void)
ext_len = DhcpExtended((u8 *)bp->bp_vend, DHCP_DISCOVER, 0, 0); ext_len = DhcpExtended((u8 *)bp->bp_vend, DHCP_DISCOVER, 0, 0);
#else #else
ext_len = BootpExtended((u8 *)bp->bp_vend); ext_len = BootpExtended((u8 *)bp->bp_vend);
#endif /* CFG_CMD_DHCP */ #endif
/* /*
* Bootp ID is the lower 4 bytes of our ethernet address * Bootp ID is the lower 4 bytes of our ethernet address
@ -710,7 +710,7 @@ BootpRequest (void)
NetSetHandler(DhcpHandler); NetSetHandler(DhcpHandler);
#else #else
NetSetHandler(BootpHandler); NetSetHandler(BootpHandler);
#endif /* CFG_CMD_DHCP */ #endif
NetSendPacket(NetTxPacket, pktlen); NetSendPacket(NetTxPacket, pktlen);
} }
@ -975,6 +975,6 @@ void DhcpRequest(void)
{ {
BootpRequest(); BootpRequest();
} }
#endif /* CFG_CMD_DHCP */ #endif
#endif /* CFG_CMD_NET */ #endif

@ -414,7 +414,7 @@ restart:
NetServerIP = getenv_IPaddr ("serverip"); NetServerIP = getenv_IPaddr ("serverip");
DhcpRequest(); /* Basically same as BOOTP */ DhcpRequest(); /* Basically same as BOOTP */
break; break;
#endif /* CFG_CMD_DHCP */ #endif
case BOOTP: case BOOTP:
BootpTry = 0; BootpTry = 0;
@ -775,7 +775,7 @@ static void PingStart(void)
PingSend(); PingSend();
} }
#endif /* CFG_CMD_PING */ #endif
#if defined(CONFIG_CMD_CDP) #if defined(CONFIG_CMD_CDP)
@ -1128,7 +1128,7 @@ static void CDPStart(void)
CDPSendTrigger(); CDPSendTrigger();
} }
#endif /* CFG_CMD_CDP */ #endif
void void
@ -1693,7 +1693,7 @@ void copy_filename (char *dst, char *src, int size)
*dst = '\0'; *dst = '\0';
} }
#endif /* CFG_CMD_NET */ #endif
void ip_to_string (IPaddr_t x, char *s) void ip_to_string (IPaddr_t x, char *s)
{ {

@ -119,4 +119,4 @@ RarpRequest (void)
NetSetHandler(RarpHandler); NetSetHandler(RarpHandler);
} }
#endif /* CFG_CMD_NET */ #endif

@ -386,4 +386,4 @@ TftpStart (void)
TftpSend (); TftpSend ();
} }
#endif /* CFG_CMD_NET */ #endif

Loading…
Cancel
Save