소스 검색

net: Print error message upon net usage when no ethernet-interface is found

This patch fixes a problem seen on PPC4xx boards, when no MAC address is
defined. Then no ethernet interface is available but a simple "tftp"
command will return without any error message which is quite confusing.

Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese 17 년 전
부모
커밋
6bc113886d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      net/eth.c

+ 3 - 1
net/eth.c

@@ -441,8 +441,10 @@ int eth_init(bd_t *bis)
 {
 	struct eth_device* old_current;
 
-	if (!eth_current)
+	if (!eth_current) {
+		puts ("No ethernet found.\n");
 		return -1;
+	}
 
 	old_current = eth_current;
 	do {