浏览代码

Use NIC's connect method.

tags/v0.9.3
Michael Brown 20 年前
父节点
当前提交
266dae4034
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      src/core/nic.c

+ 8
- 2
src/core/nic.c 查看文件

236
 /*
236
 /*
237
  * Find out what our boot parameters are
237
  * Find out what our boot parameters are
238
  */
238
  */
239
-static int nic_load_configuration(struct dev *dev __unused)
240
-{
239
+static int nic_load_configuration ( struct dev *dev ) {
240
+	struct nic *nic = &dev->nic;
241
 	int server_found;
241
 	int server_found;
242
+
243
+	if ( ! nic->nic_op->connect ( nic ) ) {
244
+		printf ( "No connection to network\n" );
245
+		return 0;
246
+	}
247
+
242
 	/* Find a server to get BOOTP reply from */
248
 	/* Find a server to get BOOTP reply from */
243
 #ifdef	RARP_NOT_BOOTP
249
 #ifdef	RARP_NOT_BOOTP
244
 	printf("Searching for server (RARP)...");
250
 	printf("Searching for server (RARP)...");

正在加载...
取消
保存