aboutsummaryrefslogtreecommitdiff
path: root/telnet.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-05-01 19:10:52 +0000
committerErik Andersen <andersen@codepoet.org>2000-05-01 19:10:52 +0000
commit94f5e0ba7ca7af260f4bf2d8c77b8e6f6f528b18 (patch)
tree7f40ce6f49ca9ce727653928d1b9f655afb5cb66 /telnet.c
parent28c49b6c9c98dc592759063d10c49b209e849cae (diff)
downloadbusybox-94f5e0ba7ca7af260f4bf2d8c77b8e6f6f528b18.tar.gz
Some accrued fixes/updates.
* cp/mv now accepts (and ignores) the -f flag, since it always does force anyway * tail can now accept -<num> commands (e.g. -10) for better compatibility with the standard tail command * added a simple id implementation; doesn't support supp. groups yet
Diffstat (limited to 'telnet.c')
-rw-r--r--telnet.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/telnet.c b/telnet.c
index 076728fb0..8c58521eb 100644
--- a/telnet.c
+++ b/telnet.c
@@ -1,6 +1,5 @@
-/* vi: set sw=4 ts=4: */
/*
- * $Id: telnet.c,v 1.1 2000/02/22 17:17:45 erik Exp $
+ * $Id: telnet.c,v 1.2 2000/05/01 19:10:52 erik Exp $
* Mini telnet implementation for busybox
*
* Copyright (C) 2000 by Randolph Chung <tausq@debian.org>
@@ -102,15 +101,15 @@ static inline void telnet_senddont(int s, int c) { SENDCOMMAND(DONT, c); }
static void telnet_setoptions(int s)
{
/*
- telnet_senddo(s, TELOPT_SGA); TFLAG_SET(TELOPT_SGA, DO);
telnet_sendwill(s, TELOPT_NAWS); TFLAG_SET(TELOPT_NAWS, WILL);
telnet_sendwill(s, TELOPT_TSPEED); TFLAG_SET(TELOPT_TSPEED, WILL);
- telnet_sendwill(s, TELOPT_LFLOW); TFLAG_SET(TELOPT_LFLOW, WILL);
- telnet_sendwill(s, TELOPT_LINEMODE); TFLAG_SET(TELOPT_LINEMODE, WILL);
telnet_sendwill(s, TELOPT_NEW_ENVIRON); TFLAG_SET(TELOPT_NEW_ENVIRON, WILL);
telnet_senddo(s, TELOPT_STATUS); TFLAG_SET(TELOPT_STATUS, DO);
telnet_sendwill(s, TELOPT_TTYPE); TFLAG_SET(TELOPT_TTYPE, WILL);
*/
+ telnet_senddo(s, TELOPT_SGA); TFLAG_SET(TELOPT_SGA, DO);
+ telnet_sendwill(s, TELOPT_LFLOW); TFLAG_SET(TELOPT_LFLOW, WILL);
+ telnet_sendwill(s, TELOPT_LINEMODE); TFLAG_SET(TELOPT_LINEMODE, WILL);
telnet_senddo(s, TELOPT_BINARY); TFLAG_SET(TELOPT_BINARY, DO);
telnet_sendwill(s, TELOPT_BINARY); TFLAG_SET(TELOPT_BINARY, WILL);
}
@@ -457,16 +456,16 @@ int main(int argc, char **argv)
int telnet_main(int argc, char **argv)
#endif
{
- int port = TELNETPORT;
+ int port = TELNETPORT;
argc--; argv++;
if (argc < 1) usage(telnet_usage);
- if (argc > 1) port = atoi(argv[1]);
- telnet_init();
- atexit(telnet_shutdown);
+ if (argc > 1) port = atoi(argv[1]);
+ telnet_init();
+ atexit(telnet_shutdown);
- telnet_start(argv[0], port);
- return 0;
+ telnet_start(argv[0], port);
+ return 0;
}
/*