]> git.sur5r.net Git - u-boot/commitdiff
net: Print error message upon net usage when no ethernet-interface is found
authorStefan Roese <sr@denx.de>
Tue, 4 Mar 2008 16:40:41 +0000 (17:40 +0100)
committerWolfgang Denk <wd@denx.de>
Tue, 4 Mar 2008 23:18:49 +0000 (00:18 +0100)
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>
net/eth.c

index 62297abba41ac44e890e6ca32829858f7c8eb159..16a6dcbd8ca1dc09847ab0391550282c29d81e7b 100644 (file)
--- a/net/eth.c
+++ b/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 {