Mercurial > ecos
changeset 854:5fd2f1ac9c80
* 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.
| author | nickg |
|---|---|
| date | Fri, 21 Mar 2003 18:14:35 +0000 |
| parents | 3131db84b89c |
| children | 26ac6ef9928b |
| files | packages/net/common/current/ChangeLog packages/net/common/current/cdl/net.cdl packages/net/common/current/include/network.h packages/net/common/current/tests/dhcp_test2.c |
| diffstat | 4 files changed, 29 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/common/current/ChangeLog +++ b/packages/net/common/current/ChangeLog @@ -1,3 +1,15 @@ +2003-03-21 Nick Garnett <nickg@balti.calivar.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@redhat.com> * cdl/net.cdl (CYGHWR_NET_DRIVERS): Removed to io/eth.
--- a/packages/net/common/current/cdl/net.cdl +++ b/packages/net/common/current/cdl/net.cdl @@ -365,6 +365,7 @@ cdl_package CYGPKG_NET { tests/flood \ tests/ping_test \ tests/dhcp_test \ + tests/dhcp_test2 \ tests/ping_lo_test \ tests/tcp_lo_test \ tests/udp_lo_test \
--- a/packages/net/common/current/include/network.h +++ b/packages/net/common/current/include/network.h @@ -36,6 +36,7 @@ #include <pkgconf/system.h> #include <pkgconf/net.h> +#include <pkgconf/io_eth_drivers.h> #undef _KERNEL #include <sys/param.h> #include <sys/socket.h>
--- a/packages/net/common/current/tests/dhcp_test2.c +++ b/packages/net/common/current/tests/dhcp_test2.c @@ -43,6 +43,8 @@ #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 @@ -160,10 +162,6 @@ 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 ); @@ -196,7 +194,6 @@ dhcp_if_fn(cyg_addrword_t data) #endif // CYGHWR_NET_DRIVER_ETH1 } CYG_TEST_PASS_EXIT( "All done" ); -#endif // CYGPKG_NET_DHCP } @@ -220,4 +217,17 @@ void cyg_user_start(void) // ------------------------------------------------------------------------ +#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
