From: Stefan Roese Date: Tue, 4 Mar 2008 17:40:41 +0100 Subject: [U-Boot-Users] [PATCH] net: Print error message upon net usage when no ethernet-interface is found In-Reply-To: <> References: <> Message-ID: <1204648841-370-1-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- net/eth.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/eth.c b/net/eth.c index 62297ab..16a6dcb 100644 --- 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 { -- 1.5.4.3