瀏覽代碼

[dhcp] Remove obsolete dhcp() function

All functionality provided by dhcp() has now been obviated by the more
generic ifconf().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 年之前
父節點
當前提交
c99f9ee9df
共有 2 個檔案被更改,包括 0 行新增25 行删除
  1. 0
    1
      src/include/usr/dhcpmgmt.h
  2. 0
    24
      src/usr/dhcpmgmt.c

+ 0
- 1
src/include/usr/dhcpmgmt.h 查看文件

@@ -11,7 +11,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
11 11
 
12 12
 struct net_device;
13 13
 
14
-extern int dhcp ( struct net_device *netdev );
15 14
 extern int pxebs ( struct net_device *netdev, unsigned int pxe_type );
16 15
 
17 16
 #endif /* _USR_DHCPMGMT_H */

+ 0
- 24
src/usr/dhcpmgmt.c 查看文件

@@ -25,39 +25,15 @@ FILE_LICENCE ( GPL2_OR_LATER );
25 25
 #include <ipxe/netdevice.h>
26 26
 #include <ipxe/dhcp.h>
27 27
 #include <ipxe/monojob.h>
28
-#include <ipxe/timer.h>
29 28
 #include <usr/ifmgmt.h>
30 29
 #include <usr/dhcpmgmt.h>
31 30
 
32
-/** Default time to wait for link-up */
33
-#define LINK_WAIT_TIMEOUT ( 15 * TICKS_PER_SEC )
34
-
35 31
 /** @file
36 32
  *
37 33
  * DHCP management
38 34
  *
39 35
  */
40 36
 
41
-int dhcp ( struct net_device *netdev ) {
42
-	int rc;
43
-
44
-	/* Check we can open the interface first */
45
-	if ( ( rc = ifopen ( netdev ) ) != 0 )
46
-		return rc;
47
-
48
-	/* Wait for link-up */
49
-	if ( ( rc = iflinkwait ( netdev, LINK_WAIT_TIMEOUT ) ) != 0 )
50
-		return rc;
51
-
52
-	/* Perform DHCP */
53
-	printf ( "DHCP (%s %s)", netdev->name,
54
-		 netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
55
-	if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
56
-		rc = monojob_wait ( "", 0 );
57
-
58
-	return rc;
59
-}
60
-
61 37
 int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
62 38
 	int rc;
63 39
 

Loading…
取消
儲存