summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-12 19:59:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-12 19:59:52 +0000
commitaf95f317bbb1dd352ade6ee9f043c822afde4f8c (patch)
treef67951db8c3ad0c71aa12851a1f940683aaa363e
parent2009-05-12 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadnetwork-demos-af95f317bbb1dd352ade6ee9f043c822afde4f8c.tar.bz2
2009-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile, init.c: Now build with libbsdport.
-rw-r--r--telnetd/ChangeLog4
-rw-r--r--telnetd/Makefile4
-rw-r--r--telnetd/init.c112
3 files changed, 61 insertions, 59 deletions
diff --git a/telnetd/ChangeLog b/telnetd/ChangeLog
index 52e2020..50ffbf6 100644
--- a/telnetd/ChangeLog
+++ b/telnetd/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * Makefile, init.c: Now build with libbsdport.
+
2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1331/networking
diff --git a/telnetd/Makefile b/telnetd/Makefile
index 8be56e6..f8f5d3b 100644
--- a/telnetd/Makefile
+++ b/telnetd/Makefile
@@ -35,8 +35,8 @@ CFLAGS_LD +=
CFLAGS_OPTIMIZE_V +=
CFLAGS_DEBUG_V += -v -qrtems_debug
-LD_PATHS +=
-LD_LIBS += -ltelnetd
+LD_PATHS +=
+override LD_LIBS += -ltelnetd
CFLAGS +=
diff --git a/telnetd/init.c b/telnetd/init.c
index 7a6b045..dbd7b38 100644
--- a/telnetd/init.c
+++ b/telnetd/init.c
@@ -7,73 +7,16 @@
#define USE_RTEMS_SHELL
-/*
- * Configuration parameters
- */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
-#endif
-#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-#define CONFIGURE_MAXIMUM_PTYS 8
-
-#if defined(USE_RTEMS_SHELL)
- #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-#endif
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_STACK_CHECKER_ENABLED
-
-#define CONFIGURE_MEMORY_OVERHEAD 256
-#define CONFIGURE_MESSAGE_BUFFER_MEMORY (32 * 1024)
-#define CONFIGURE_MAXIMUM_SEMAPHORES 40
-#define CONFIGURE_MAXIMUM_TASKS 20
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
-
-#define CONFIGURE_MICROSECONDS_PER_TICK 1000
-
-#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024)
-#define CONFIGURE_INIT_TASK_PRIORITY 120
-#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
-#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
- RTEMS_NO_TIMESLICE | \
- RTEMS_NO_ASR | \
- RTEMS_INTERRUPT_LEVEL(0))
-
-#define CONFIGURE_MAXIMUM_DRIVERS 10
-#define CONFIGURE_INIT
-
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/telnetd.h>
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-/* configuration information */
-
-#include <rtems/confdefs.h>
#include <bsp.h>
#include <errno.h>
#include <time.h>
-#include <rtems/confdefs.h>
#include <stdio.h>
#include <rtems/rtems_bsdnet.h>
#include <rtems/telnetd.h>
#include <rtems/shell.h>
-
#include <rtems/error.h>
#include <rpc/rpc.h>
#include <netinet/in.h>
@@ -233,3 +176,58 @@ rtems_task Init(
rtems_task_delete(RTEMS_SELF);
}
+/*
+ * Configuration parameters
+ */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#ifdef RTEMS_BSP_HAS_IDE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
+#endif
+#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+#define CONFIGURE_MAXIMUM_PTYS 8
+
+#if defined(USE_RTEMS_SHELL)
+ #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
+#endif
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_STACK_CHECKER_ENABLED
+
+#define CONFIGURE_MEMORY_OVERHEAD 256
+#define CONFIGURE_MESSAGE_BUFFER_MEMORY (32 * 1024)
+#define CONFIGURE_MAXIMUM_SEMAPHORES 40
+#define CONFIGURE_MAXIMUM_TASKS 20
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
+
+#define CONFIGURE_MICROSECONDS_PER_TICK 1000
+
+#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024)
+#define CONFIGURE_INIT_TASK_PRIORITY 120
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
+ RTEMS_NO_TIMESLICE | \
+ RTEMS_NO_ASR | \
+ RTEMS_INTERRUPT_LEVEL(0))
+
+#define CONFIGURE_MAXIMUM_DRIVERS 10
+#define CONFIGURE_INIT
+
+#include <stdlib.h>
+#include <rtems.h>
+#include <rtems/telnetd.h>
+
+/* functions */
+
+rtems_task Init(
+ rtems_task_argument argument
+);
+
+/* configuration information */
+
+#include <rtems/confdefs.h>