Skip to contentSkip to conversation

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

PATCH New Stefan Roese 2 participants 2 messages Mar 4, 2008 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/eth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/eth.c +3 -1
index 62297ab..16a6dcb 100644
@@ -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 {
Signature · 1 line
1.5.4.3
#1 lore raw

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

Quoted 5 lines · In message <[email protected]> you wrote:

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.

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If you are afraid of loneliness, don't marry."             - Chekhov