]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[dhcp] Remove obsolete dhcp() function
authorMichael Brown <mcb30@ipxe.org>
Mon, 4 Nov 2013 23:07:06 +0000 (23:07 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 5 Nov 2013 17:42:55 +0000 (17:42 +0000)
All functionality provided by dhcp() has now been obviated by the more
generic ifconf().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/usr/dhcpmgmt.h
src/usr/dhcpmgmt.c

index 2394dac42b1e3f46a3aaba47dfc6d059276e2096..af1eceb1748d6df5146eeacd8030f2f7627cacc2 100644 (file)
@@ -11,7 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
 
 struct net_device;
 
-extern int dhcp ( struct net_device *netdev );
 extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
 
 #endif /* _USR_DHCPMGMT_H */
index 9309671e9cc20ca8963649b184100b6ee093eb8e..23982b19c39ac402a8eae58c866873420237a4aa 100644 (file)
@@ -25,39 +25,15 @@ FILE_LICENCE ( GPL2_OR_LATER );
 #include <ipxe/netdevice.h>
 #include <ipxe/dhcp.h>
 #include <ipxe/monojob.h>
-#include <ipxe/timer.h>
 #include <usr/ifmgmt.h>
 #include <usr/dhcpmgmt.h>
 
-/** Default time to wait for link-up */
-#define LINK_WAIT_TIMEOUT ( 15 * TICKS_PER_SEC )
-
 /** @file
  *
  * DHCP management
  *
  */
 
-int dhcp ( struct net_device *netdev ) {
-       int rc;
-
-       /* Check we can open the interface first */
-       if ( ( rc = ifopen ( netdev ) ) != 0 )
-               return rc;
-
-       /* Wait for link-up */
-       if ( ( rc = iflinkwait ( netdev, LINK_WAIT_TIMEOUT ) ) != 0 )
-               return rc;
-
-       /* Perform DHCP */
-       printf ( "DHCP (%s %s)", netdev->name,
-                netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
-       if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
-               rc = monojob_wait ( "", 0 );
-
-       return rc;
-}
-
 int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
        int rc;