Changeset 84b2a48 in network-demos


Ignore:
Timestamp:
Nov 9, 2007, 9:39:43 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master, network-demos-4-10-branch, network-demos-4-9-branch
Children:
5c0f2e9
Parents:
1bfffa5
Message:

2007-11-09 Joel Sherrill <joel.sherrill@…>

  • init.c: Test improved.
Location:
telnetd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • telnetd/ChangeLog

    r1bfffa5 r84b2a48  
     12007-11-09      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * init.c: Test improved.
     4
    152007-09-25      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • telnetd/init.c

    r1bfffa5 r84b2a48  
    66 */
    77
     8#define USE_RTEMS_SHELL
     9
    810#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    911#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    1012#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    1113#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS        20
    12 #define CONFIGURE_MAXIMUM_PTYS                          1
     14#define CONFIGURE_MAXIMUM_PTYS                          8
    1315#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
    1416
     
    3133#define CONFIGURE_MAXIMUM_DRIVERS 10
    3234#define CONFIGURE_INIT
     35
     36#define STACK_CHECKER_ON
    3337
    3438#include <stdlib.h>
     
    6569#include <sys/socket.h>
    6670#include "../networkconfig.h"
     71
     72#if defined(USE_ECHO_SHELL)
     73
     74#define SHELL_HELP_MSG \
     75  "Starting echoShell via telnetd -- default password is rtems\n"
    6776
    6877/*
     
    123132}
    124133
     134#define SHELL_ENTRY echoShell
     135
     136#endif
     137
     138#if defined(USE_RTEMS_SHELL)
     139
     140#include <rtems/shell.h>
     141
     142#define SHELL_HELP_MSG \
     143  "Starting rtemsShell via telnetd -- default account is rtems w/no password\n"
     144
     145void rtemsShell(
     146  char *pty_name,
     147  void *cmd_arg
     148)
     149{
     150  printk("============== Starting Shell ==============\n");
     151  shell_shell_loop( NULL );
     152  printk("============== Exiting Shell ==============\n");
     153}
     154
     155#define SHELL_ENTRY rtemsShell
     156
     157#endif
     158
    125159/*
    126160 *  Init task
     
    139173
    140174  printf("============== Start Telnetd ==============\n");
    141   printk( "Starting echoShell via telnetd -- default password is rtems\n" );
     175
     176  printk( SHELL_HELP_MSG );
     177
    142178  rtems_telnetd_initialize(
    143     echoShell,                 /* "shell" function */
     179    SHELL_ENTRY,               /* "shell" function */
    144180    NULL,                      /* no context necessary for echoShell */
    145181    FALSE,                     /* spawn a new thread */
    146     RTEMS_MINIMUM_STACK_SIZE,  /* default stack size please */
    147     1                          /* priority .. we feel important today */
     182    RTEMS_MINIMUM_STACK_SIZE * 4,  /* default stack size please */
     183    1,                         /* priority .. we feel important today */
     184    0                          /* do not ask for password */
    148185  );
    149186
Note: See TracChangeset for help on using the changeset viewer.