This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
net/common housekeeping
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: 21 Mar 2003 18:23:23 +0000
- Subject: net/common housekeeping
A couple of small things I tripped over...
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.26
diff -u -5 -r1.26 ChangeLog
--- ChangeLog 20 Mar 2003 15:44:39 -0000 1.26
+++ ChangeLog 21 Mar 2003 18:13:37 -0000
@@ -1,5 +1,17 @@
+2003-03-21 Nick Garnett <nickg at balti dot calivar dot com>
+
+ * include/network.h: Added include of pkgconf/io_eth_drivers.h
+ since the recent move of CYGHWR_NET_DRIVERS prevented some tests
+ building. This fixes the problem.
+
+ * tests/dhcp_test2.c: Sorted out ifdefs so that this test builds
+ when DHCP is disabled.
+
+ * cdl/net.cdl: Reinstated dhcp_test2 into list of tests: it was
+ accidentally removed in the 2003-03-14 checkin.
+
2003-03-20 Mark Salter <msalter at redhat dot com>
* cdl/net.cdl (CYGHWR_NET_DRIVERS): Removed to io/eth.
2003-03-18 Barton Meeks <bartonm2002 at yahoo dot com>
Index: cdl/net.cdl
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/cdl/net.cdl,v
retrieving revision 1.5
diff -u -5 -r1.5 net.cdl
--- cdl/net.cdl 20 Mar 2003 15:44:39 -0000 1.5
+++ cdl/net.cdl 21 Mar 2003 18:13:38 -0000
@@ -363,10 +363,11 @@
tests/set_mac_address \
tests/bridge \
tests/flood \
tests/ping_test \
tests/dhcp_test \
+ tests/dhcp_test2 \
tests/ping_lo_test \
tests/tcp_lo_test \
tests/udp_lo_test \
tests/multi_lo_select \
tests/tcp_lo_select"
Index: include/network.h
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/include/network.h,v
retrieving revision 1.1
diff -u -5 -r1.1 network.h
--- include/network.h 20 May 2002 22:25:03 -0000 1.1
+++ include/network.h 21 Mar 2003 18:13:39 -0000
@@ -34,10 +34,11 @@
#define NO_LIBKERN_INLINE // Avoid kernel inline functions
#include <pkgconf/system.h>
#include <pkgconf/net.h>
+#include <pkgconf/io_eth_drivers.h>
#undef _KERNEL
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
Index: tests/dhcp_test2.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/tests/dhcp_test2.c,v
retrieving revision 1.1
diff -u -5 -r1.1 dhcp_test2.c
--- tests/dhcp_test2.c 20 May 2002 22:25:05 -0000 1.1
+++ tests/dhcp_test2.c 21 Mar 2003 18:13:39 -0000
@@ -41,10 +41,12 @@
#include <pkgconf/system.h>
#include <pkgconf/net.h>
#include <cyg/infra/testcase.h>
+#ifdef CYGPKG_NET_DHCP
+
#ifdef CYGBLD_DEVS_ETH_DEVICE_H // Get the device config if it exists
#include CYGBLD_DEVS_ETH_DEVICE_H // May provide CYGTST_DEVS_ETH_TEST_NET_REALTIME
#endif
@@ -158,14 +160,10 @@
static void
dhcp_if_fn(cyg_addrword_t data)
{
CYG_TEST_INIT();
-#ifndef CYGPKG_NET_DHCP
- CYG_TEST_NA( "DHCP is not enabled" );
- CYG_TEST_EXIT( "DHCP is not enabled" );
-#else
#ifdef CYGHWR_NET_DRIVER_ETH0
tdhcp_init( 0 );
#endif // CYGHWR_NET_DRIVER_ETH0
#ifdef CYGHWR_NET_DRIVER_ETH1
@@ -194,11 +192,10 @@
#ifdef CYGHWR_NET_DRIVER_ETH1
tdhcp_release_one( 1 );
#endif // CYGHWR_NET_DRIVER_ETH1
}
CYG_TEST_PASS_EXIT( "All done" );
-#endif // CYGPKG_NET_DHCP
}
// ------------------------------------------------------------------------
@@ -215,9 +212,22 @@
// This priroty should be right (lower than net thread prio) by default.
cyg_thread_create(CYGPKG_NET_DHCP_THREAD_PRIORITY, dhcp_if_fn, (cyg_addrword_t) 0, "dhcp",
(void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
cyg_thread_resume(thread[0]);
}
+
+// ------------------------------------------------------------------------
+
+#else // CYGPKG_NET_DHCP
+
+void cyg_user_start(void)
+{
+ CYG_TEST_INIT();
+ CYG_TEST_NA( "DHCP is not enabled" );
+ CYG_TEST_EXIT( "DHCP is not enabled" );
+}
+
+#endif // CYGPKG_NET_DHCP
// ------------------------------------------------------------------------
// EOF dhcp_test2.c
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts