summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsascha <sascha@nomad.localdomain>2007-10-18 12:06:50 +0200
committersascha <sascha@nomad.localdomain>2007-10-18 12:06:50 +0200
commit2db56b3031cdb2201c21bccd9a624272ec0777f7 (patch)
tree0da97172768bd93cff7688cf7ec62b6f5a066c61 /net
parent3c37202662cb30dca373c8dd099638f9ca8e039a (diff)
downloadbarebox-2db56b3031cdb2201c21bccd9a624272ec0777f7.tar.gz
barebox-2db56b3031cdb2201c21bccd9a624272ec0777f7.tar.xz
When printing error messages about network parameters print
the network device id with it.
Diffstat (limited to 'net')
-rw-r--r--net/net.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/net.c b/net/net.c
index ad93787248..fd2effe4c6 100644
--- a/net/net.c
+++ b/net/net.c
@@ -81,6 +81,7 @@
#include <environment.h>
#include <param.h>
#include <net.h>
+#include <driver.h>
#include "bootp.h"
#include "tftp.h"
#include "rarp.h"
@@ -1352,6 +1353,8 @@ NetReceive(uchar * inpkt, int len)
static int net_check_prereq (proto_t protocol)
{
+ char *ethid = eth_get_current()->dev->id;
+
switch (protocol) {
/* Fall through */
#ifdef CONFIG_NET_PING
@@ -1376,13 +1379,13 @@ static int net_check_prereq (proto_t protocol)
case NETCONS:
case TFTP:
if (NetServerIP == 0) {
- puts ("*** ERROR: `serverip' not set\n");
+ printf("*** ERROR: `%s.serverip' not set\n", ethid);
return (1);
}
common:
if (NetOurIP == 0) {
- puts ("*** ERROR: `ipaddr' not set\n");
+ printf("*** ERROR: `%s.ipaddr' not set\n", ethid);
return (1);
}
/* Fall through */
@@ -1392,7 +1395,7 @@ static int net_check_prereq (proto_t protocol)
case BOOTP:
case CDP:
if (memcmp (NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
- puts ("*** ERROR: `ethaddr' not set\n");
+ printf("*** ERROR: `%s.ethaddr' not set\n", ethid);
return (1);
}
/* Fall through */