[rtems commit] telnetd: Fix warnings
Sebastian Huber
sebh at rtems.org
Mon Apr 25 06:10:56 UTC 2016
Module: rtems
Branch: master
Commit: f4c59d07d5d639856887e6aec624d608e8024cf7
Changeset: http://git.rtems.org/rtems/commit/?id=f4c59d07d5d639856887e6aec624d608e8024cf7
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Apr 25 08:08:35 2016 +0200
telnetd: Fix warnings
---
cpukit/telnetd/check_passwd.c | 3 +--
cpukit/telnetd/des.c | 12 +++---------
cpukit/telnetd/des.h | 1 +
cpukit/telnetd/pty.c | 1 +
cpukit/telnetd/pty.h | 8 ++++++++
5 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/cpukit/telnetd/check_passwd.c b/cpukit/telnetd/check_passwd.c
index 9e3f2c9..aae1c89 100644
--- a/cpukit/telnetd/check_passwd.c
+++ b/cpukit/telnetd/check_passwd.c
@@ -69,10 +69,9 @@
#include <rtems/telnetd.h>
+#include "des.h"
#include "passwd.h"
-char *__des_crypt_r( const char *, const char *, char *, int);
-
/**
* @brief Standard Telnet login check that uses DES to encrypt the passphrase.
*
diff --git a/cpukit/telnetd/des.c b/cpukit/telnetd/des.c
index 542e896..1d0295a 100644
--- a/cpukit/telnetd/des.c
+++ b/cpukit/telnetd/des.c
@@ -74,6 +74,8 @@
#include <string.h>
#include <stdlib.h>
+#include "des.h"
+
#define REENTRANT
/* Re-entrantify me -- all this junk needs to be in
* struct crypt_data to make this really reentrant... */
@@ -263,7 +265,7 @@ ascii_to_bin(char ch)
return(0);
}
-struct Des_Context *
+static struct Des_Context *
des_ctx_init(void)
{
struct Des_Context *des_ctx;
@@ -834,14 +836,6 @@ bailout:
return rval;
}
-char *
-__des_crypt(const char *key, const char *setting)
-{
- static char output[21];
- return __des_crypt_r(key, setting, output, sizeof(output));
-}
-
-
#ifdef DEBUG
void
diff --git a/cpukit/telnetd/des.h b/cpukit/telnetd/des.h
new file mode 100644
index 0000000..382dab7
--- /dev/null
+++ b/cpukit/telnetd/des.h
@@ -0,0 +1 @@
+char *__des_crypt_r(const char *, const char *, char *, int);
diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
index 30bfe98..d41de97 100644
--- a/cpukit/telnetd/pty.c
+++ b/cpukit/telnetd/pty.c
@@ -35,6 +35,7 @@
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/bspIo.h>
+#include <rtems/pty.h>
#include <errno.h>
#include <sys/socket.h>
/*-----------------------------------------*/
diff --git a/cpukit/telnetd/pty.h b/cpukit/telnetd/pty.h
index 1d86294..392bfd0 100644
--- a/cpukit/telnetd/pty.h
+++ b/cpukit/telnetd/pty.h
@@ -61,6 +61,14 @@ rtems_device_driver pty_control(
{ pty_initialize , pty_open , pty_close , \
pty_read , pty_write , pty_control }
+/* Internal functions */
+
+int telnet_pty_initialize(void);
+
+int telnet_pty_finalize(void);
+
+char *telnet_get_pty(int);
+
#ifdef __cplusplus
}
#endif
More information about the vc
mailing list