This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Reduce ethernet diagnostic output when debug options are off
- From: "Jeff Duncan" <Jeffd at Magtek dot com>
- To: "ecos-patches at sources dot redhat dot com" <'ecos-patches at sources dot redhat dot com'>
- Date: Sat, 28 Feb 2004 11:55:29 -0800
- Subject: Reduce ethernet diagnostic output when debug options are off
I used a few of the existing debug flags in the CDLs to shut off some more of the ethernet diagnostic output.
Jeff
-----
Index: packages/net/common/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.54
diff -u -r1.54 ChangeLog
--- packages/net/common/current/ChangeLog 10 Dec 2003 12:09:24 -0000 1.54
+++ packages/net/common/current/ChangeLog 28 Feb 2004 19:48:10 -0000
@@ -1,3 +1,13 @@
+2004-02-28 Jeff Duncan <jeffd@magtek.com>
+
+ * src/bootp_support.c: Turn off diagnostic output if
+ CYGPKG_NET_DEBUG is not enabled.
+
+ * src/network_support.c: Turn off diagnostic output if
+ CYGPKG_NET_DEBUG is not enabled. Also turn off bootp
+ output based on CYGHWR_NET_DRIVER_ETH0_BOOTP_SHOW
+ when using pre-set (non-bootp/non-dhcp) addresses.
+
2003-12-10 Gary Thomas <gary@mlbassoc.com>
* src/inet_ntoa.c: Add thread safe inet_ntoa_r() and change
Index: packages/net/common/current/src/bootp_support.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/bootp_support.c,v
retrieving revision 1.4
diff -u -r1.4 bootp_support.c
--- packages/net/common/current/src/bootp_support.c 21 Oct 2003 17:50:58 -0000 1.4
+++ packages/net/common/current/src/bootp_support.c 28 Feb 2004 19:48:13 -0000
@@ -76,6 +76,11 @@
#define perror(s) diag_printf(#s ": %s\n", strerror(errno))
#endif
+
+#ifndef CYGPKG_NET_DEBUG
+#define diag_printf(fmt,args...)
+#endif
+
// This function sets up the interface it the simplest configuration.
// Just enough to broadcast a BOOTP request and get a response.
// It returns 'true' if a response was obtained.
Index: packages/net/common/current/src/network_support.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/network_support.c,v
retrieving revision 1.7
diff -u -r1.7 network_support.c
--- packages/net/common/current/src/network_support.c 26 May 2003 07:33:06 -0000 1.7
+++ packages/net/common/current/src/network_support.c 28 Feb 2004 19:48:14 -0000
@@ -107,6 +107,10 @@
#define perror(s) diag_printf(#s ": %s\n", strerror(errno))
#endif
+#ifndef CYGPKG_NET_DEBUG
+#define diag_printf(fmt,args...)
+#endif
+
#ifdef CYGPKG_NET_NLOOP
#if 0 < CYGPKG_NET_NLOOP
//
@@ -348,7 +352,9 @@
string(CYGHWR_NET_DRIVER_ETH0_ADDRS_BROADCAST),
string(CYGHWR_NET_DRIVER_ETH0_ADDRS_GATEWAY),
string(CYGHWR_NET_DRIVER_ETH0_ADDRS_SERVER));
+#ifdef CYGHWR_NET_DRIVER_ETH0_BOOTP_SHOW
show_bootp(eth0_name, ð0_bootp_data);
+#endif
#endif
#ifdef CYGPKG_IO_PCMCIA
bail_eth0:
Index: packages/io/eth/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/ChangeLog,v
retrieving revision 1.48
diff -u -r1.48 ChangeLog
--- packages/io/eth/current/ChangeLog 17 Jan 2004 14:14:41 -0000 1.48
+++ packages/io/eth/current/ChangeLog 28 Feb 2004 19:47:13 -0000
@@ -1,3 +1,8 @@
+2004-02-28 Jeff Duncan <jeffd@magtek.com>
+
+ * src/net/eth_drv.c: Turn off multicast warning if
+ CYGDBG_IO_ETH_DRIVERS_DEBUG is not enabled.
+
2004-01-09 Jani Monoses <jani@iv.ro>
* include/eth_drv.h:
Index: packages/io/eth/current/src/net/eth_drv.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/src/net/eth_drv.c,v
retrieving revision 1.30
diff -u -r1.30 eth_drv.c
--- packages/io/eth/current/src/net/eth_drv.c 5 Jan 2004 21:58:28 -0000 1.30
+++ packages/io/eth/current/src/net/eth_drv.c 28 Feb 2004 19:47:14 -0000
@@ -578,8 +578,10 @@
// Note: drivers may behave like IFF_ALLMULTI if the list is
// more than their hardware can handle, e.g. some can only handle 1.
if ((sc->funs->control)(sc, mode, &mc_list, sizeof(mc_list))) {
+#ifdef CYGDBG_IO_ETH_DRIVERS_DEBUG
diag_printf( "[%s] Warning: Driver can't set multi-cast mode\n",
__FUNCTION__ );
+#endif
error = EINVAL;
}
break;