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.
This commit is contained in:
Ralf Corsepius
2005-10-25 14:19:45 +00:00
parent af0283385c
commit 7906167926
4 changed files with 33 additions and 8 deletions
+11
View File
@@ -1,3 +1,14 @@
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.
2005-10-25 Ralf Corsepius <ralf.corsepius@rtems.org>
* telnet/telnet.h, telnet/telnet.c: Rename
+14 -3
View File
@@ -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,
+6 -3
View File
@@ -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;
+2 -2
View File
@@ -16,8 +16,8 @@
* $Id$
*/
#ifndef __TELNETD_H
#define __TELNETD_H
#ifndef _RTEMS_TELNETD_H
#define _RTEMS_TELNETD_H
#ifdef __cplusplus
extern "C" {