diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2005-10-25 14:19:45 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2005-10-25 14:19:45 +0000 |
commit | 7906167926e8dc3c312191c19d9bbae5d56b82ce (patch) | |
tree | deb1263f0368855c727556d2502e7d8c7f4f984d /cpukit/telnetd | |
parent | Make many functions static. (diff) | |
download | rtems-7906167926e8dc3c312191c19d9bbae5d56b82ce.tar.bz2 |
2005-10-25 Ralf Corsepius <ralf.corsepius@rtems.org>
* telnetd/icmds.c: Rename register_icmds to
_rtems_telnet_register_icmds. Make main_* functions static.
* telnetd/pty.c: Make many functions static.
Rename rtems_telnetd_maximum_ptys to rtems_pty_maximum_ptys.
* telnetd/pty.h: Reflect changes above.
Rename get_pty to rtems_pty_get. New header guards.
* telnetd/telnetd.c: Reflect changes above.
* telnetd/telnetd.h: New header guards.
Diffstat (limited to '')
-rw-r--r-- | cpukit/telnetd/pty.h | 17 | ||||
-rw-r--r-- | cpukit/telnetd/telnetd.c | 9 | ||||
-rw-r--r-- | cpukit/telnetd/telnetd.h | 4 |
3 files changed, 22 insertions, 8 deletions
diff --git a/cpukit/telnetd/pty.h b/cpukit/telnetd/pty.h index 5d27ddb9d9..7445f604a3 100644 --- a/cpukit/telnetd/pty.h +++ b/cpukit/telnetd/pty.h @@ -11,8 +11,8 @@ * $Id$ */ -#ifndef __PTY_H -#define __PTY_H +#ifndef _RTEMS_PTY_H +#define _RTEMS_PTY_H #ifdef __cplusplus extern "C" { @@ -20,7 +20,18 @@ extern "C" { #include <rtems.h> -char * get_pty(int socket); +/* Number of ptys to setup */ +extern size_t rtems_pty_maximum_ptys; + +/* Return the devname for a free pty slot. + * If no slot available (socket>=0) + * then the socket argument is closed + */ +char * rtems_pty_get(int socket); + + +/* OBSOLETE */ +#define get_pty rtems_pty_get rtems_device_driver pty_initialize( rtems_device_major_number major, diff --git a/cpukit/telnetd/telnetd.c b/cpukit/telnetd/telnetd.c index 4673cef3a4..ce5e331976 100644 --- a/cpukit/telnetd/telnetd.c +++ b/cpukit/telnetd/telnetd.c @@ -34,6 +34,10 @@ #include <stdlib.h> #include <string.h> /* memset */ #include <stdio.h> + +/* FIXME: This should not be here */ +extern void _rtems_telnetd_register_icmds(void); + /***********************************************************/ rtems_id telnetd_task_id =0; uint32_t telnetd_stack_size =16384; @@ -71,7 +75,7 @@ rtems_task rtems_task_telnetd(rtems_task_argument task_argument) { perror("telnetd:accept"); break; }; - if ((devname = get_pty(acp_socket)) ) { + if ((devname = rtems_pty_get(acp_socket)) ) { shell_init(&devname[5], telnetd_stack_size, telnetd_task_priority, @@ -85,10 +89,9 @@ rtems_task rtems_task_telnetd(rtems_task_argument task_argument) { } /***********************************************************/ int rtems_telnetd_initialize(void) { - void register_icmds(void); rtems_status_code sc; - register_icmds(); /* stats for tcp/ip */ + _rtems_telnetd_register_icmds(); /* stats for tcp/ip */ if (telnetd_task_id ) return RTEMS_RESOURCE_IN_USE; if (telnetd_stack_size<=0 ) telnetd_stack_size =16384; diff --git a/cpukit/telnetd/telnetd.h b/cpukit/telnetd/telnetd.h index 102f59feae..c8c068c9fb 100644 --- a/cpukit/telnetd/telnetd.h +++ b/cpukit/telnetd/telnetd.h @@ -16,8 +16,8 @@ * $Id$ */ -#ifndef __TELNETD_H -#define __TELNETD_H +#ifndef _RTEMS_TELNETD_H +#define _RTEMS_TELNETD_H #ifdef __cplusplus extern "C" { |