@ -138,36 +138,6 @@ static int truncate_sz (const char *name, int maxlen, int curlen)
return ( curlen ) ;
return ( curlen ) ;
}
}
/*
* Check if autoload is enabled . If so , use either NFS or TFTP to download
* the boot file .
*/
static void auto_load ( void )
{
const char * s = getenv ( " autoload " ) ;
if ( s ! = NULL ) {
if ( * s = = ' n ' ) {
/*
* Just use BOOTP to configure system ;
* Do not use TFTP to load the bootfile .
*/
NetState = NETLOOP_SUCCESS ;
return ;
}
# if defined(CONFIG_CMD_NFS)
if ( strcmp ( s , " NFS " ) = = 0 ) {
/*
* Use NFS to load the bootfile .
*/
NfsStart ( ) ;
return ;
}
# endif
}
TftpStart ( TFTPGET ) ;
}
# if !defined(CONFIG_CMD_DHCP)
# if !defined(CONFIG_CMD_DHCP)
static void BootpVendorFieldProcess ( u8 * ext )
static void BootpVendorFieldProcess ( u8 * ext )
@ -354,7 +324,7 @@ BootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
debug ( " Got good BOOTP \n " ) ;
debug ( " Got good BOOTP \n " ) ;
auto_load ( ) ;
net_ auto_load( ) ;
}
}
# endif
# endif
@ -979,7 +949,7 @@ DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
dhcp_state = BOUND ;
dhcp_state = BOUND ;
printf ( " DHCP client bound to address %pI4 \n " , & NetOurIP ) ;
printf ( " DHCP client bound to address %pI4 \n " , & NetOurIP ) ;
auto_load ( ) ;
net_ auto_load( ) ;
return ;
return ;
}
}
break ;
break ;