summaryrefslogtreecommitdiffhomepage
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-27 11:54:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-27 11:54:59 +0000
commit5014dada3fa0bb6f6873e28fe6491f0789239cdc (patch)
tree25cc7ed4e457d924131f3e7cdbab1e187a617639 /networking
parent8195d20e36bfeeb30b3424e2635ba4757ec38137 (diff)
script: new applet by Pascal Bellard <pascal.bellard AT ads-lu.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/telnetd.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 0bffa9700..05de49e8a 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -153,53 +153,6 @@ remove_iacs(struct tsession *ts, int *pnum_totty)
}
-static int
-getpty(char *line, int size)
-{
- int p;
-#if ENABLE_FEATURE_DEVPTS
- p = open("/dev/ptmx", O_RDWR);
- if (p > 0) {
- const char *name;
- grantpt(p);
- unlockpt(p);
- name = ptsname(p);
- if (!name) {
- bb_perror_msg("ptsname error (is /dev/pts mounted?)");
- return -1;
- }
- safe_strncpy(line, name, size);
- return p;
- }
-#else
- struct stat stb;
- int i;
- int j;
-
- strcpy(line, "/dev/ptyXX");
-
- for (i = 0; i < 16; i++) {
- line[8] = "pqrstuvwxyzabcde"[i];
- line[9] = '0';
- if (stat(line, &stb) < 0) {
- continue;
- }
- for (j = 0; j < 16; j++) {
- line[9] = j < 10 ? j + '0' : j - 10 + 'a';
- if (DEBUG)
- fprintf(stderr, "Trying to open device: %s\n", line);
- p = open(line, O_RDWR | O_NOCTTY);
- if (p >= 0) {
- line[5] = 't';
- return p;
- }
- }
- }
-#endif /* FEATURE_DEVPTS */
- return -1;
-}
-
-
static struct tsession *
make_new_session(
USE_FEATURE_TELNETD_STANDALONE(int sock)