When printing error messages about network parameters print
the network device id with it.
This commit is contained in:
parent
3c37202662
commit
2db56b3031
|
@ -54,8 +54,6 @@ enum eth_state_t {
|
||||||
struct device_d;
|
struct device_d;
|
||||||
|
|
||||||
struct eth_device {
|
struct eth_device {
|
||||||
char name[NAMESIZE];
|
|
||||||
// unsigned char enetaddr[6];
|
|
||||||
int iobase;
|
int iobase;
|
||||||
int state;
|
int state;
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
#include <environment.h>
|
#include <environment.h>
|
||||||
#include <param.h>
|
#include <param.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
#include <driver.h>
|
||||||
#include "bootp.h"
|
#include "bootp.h"
|
||||||
#include "tftp.h"
|
#include "tftp.h"
|
||||||
#include "rarp.h"
|
#include "rarp.h"
|
||||||
|
@ -1352,6 +1353,8 @@ NetReceive(uchar * inpkt, int len)
|
||||||
|
|
||||||
static int net_check_prereq (proto_t protocol)
|
static int net_check_prereq (proto_t protocol)
|
||||||
{
|
{
|
||||||
|
char *ethid = eth_get_current()->dev->id;
|
||||||
|
|
||||||
switch (protocol) {
|
switch (protocol) {
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
#ifdef CONFIG_NET_PING
|
#ifdef CONFIG_NET_PING
|
||||||
|
@ -1376,13 +1379,13 @@ static int net_check_prereq (proto_t protocol)
|
||||||
case NETCONS:
|
case NETCONS:
|
||||||
case TFTP:
|
case TFTP:
|
||||||
if (NetServerIP == 0) {
|
if (NetServerIP == 0) {
|
||||||
puts ("*** ERROR: `serverip' not set\n");
|
printf("*** ERROR: `%s.serverip' not set\n", ethid);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
common:
|
common:
|
||||||
|
|
||||||
if (NetOurIP == 0) {
|
if (NetOurIP == 0) {
|
||||||
puts ("*** ERROR: `ipaddr' not set\n");
|
printf("*** ERROR: `%s.ipaddr' not set\n", ethid);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
|
@ -1392,7 +1395,7 @@ static int net_check_prereq (proto_t protocol)
|
||||||
case BOOTP:
|
case BOOTP:
|
||||||
case CDP:
|
case CDP:
|
||||||
if (memcmp (NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
|
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);
|
return (1);
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
|
|
Loading…
Reference in New Issue