Changeset 6ef43a6 in network-demos
- Timestamp:
- 10/15/08 17:25:21 (14 years ago)
- Branches:
- network-demos-4-9-branch
- Children:
- eded6bf
- Parents:
- 5b80b73
- Location:
- telnetd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
telnetd/ChangeLog
r5b80b73 r6ef43a6 1 2008-10-15 Joel Sherrill <joel.sherrill@OARcorp.com> 2 3 PR 1331/networking 4 * init.c: Improve comments and explanation of options to 5 rtems_telnetd_initialize. 6 1 7 2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com> 2 8 -
telnetd/init.c
r5b80b73 r6ef43a6 83 83 #include <sys/socket.h> 84 84 #include "../networkconfig.h" 85 86 /* 87 * If true, listen on socket(s). 88 * If false, remain on console. 89 */ 90 /* #define REMAIN_ON_CONSOLE */ 91 bool remain_on_console = false; 85 92 86 93 #if defined(USE_ECHO_SHELL) … … 169 176 ) 170 177 { 171 printk("============== Starting Shell ==============\n"); 178 if ( !remain_on_console ) 179 printk("============== Starting Shell ==============\n"); 180 172 181 rtems_shell_main_loop( NULL ); 173 printk("============== Exiting Shell ==============\n"); 182 183 if ( !remain_on_console ) 184 printk("============== Exiting Shell ==============\n"); 174 185 } 175 186 … … 185 196 ) 186 197 { 187 printf("\n\n*** Telnetd Server Test ***\n\r" );188 189 printf("============== Initializing Network ==============\n");198 fprintf(stderr, "\n\n*** Telnetd Server Test ***\n\r" ); 199 200 fprintf(stderr, "============== Initializing Network ==============\n"); 190 201 rtems_bsdnet_initialize_network (); 191 202 192 printf("============== Add Route ==============\n");203 fprintf(stderr, "============== Add Route ==============\n"); 193 204 rtems_bsdnet_show_inet_routes (); 194 205 195 printf("============== Start Telnetd ==============\n");206 fprintf(stderr, "============== Start Telnetd ==============\n"); 196 207 197 208 printk( SHELL_HELP_MSG ); 198 209 210 #if defined(REMAIN_ON_CONSOLE) 211 remain_on_console = true; 212 #endif 213 199 214 rtems_telnetd_initialize( 200 SHELL_ENTRY, /* "shell" function */ 201 NULL, /* no context necessary for echoShell */ 202 FALSE, /* spawn a new thread */ 215 SHELL_ENTRY, /* "shell" function */ 216 NULL, /* no context necessary for echoShell */ 217 remain_on_console, /* true == remain on console */ 218 /* false == listen on sockets */ 203 219 RTEMS_MINIMUM_STACK_SIZE * 20, /* shell needs a large stack */ 204 1, /* priority .. we feel important today */ 205 0 /* do not ask for password */ 220 1, /* priority .. we feel important today */ 221 false /* false = telnetd does NOT ask for password */ 222 /* true = telnetd asks for password */ 223 /* RTEMS Shell always asks for user/passwd */ 206 224 ); 207 225 208 printf("============== Deleting Init Task ==============\n"); 226 if ( !remain_on_console ) 227 fprintf(stderr, "============== Deleting Init Task ==============\n"); 209 228 rtems_task_delete(RTEMS_SELF); 210 229 }
Note: See TracChangeset
for help on using the changeset viewer.