diff options
author | jkh <jkh@FreeBSD.org> | 1995-02-09 11:11:01 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-02-09 11:11:01 +0000 |
commit | 87505148a9a19bf8728986bf963fa5ded42762d8 (patch) | |
tree | 6a76152d2be220e96e128d6dbb61f9479f5ae508 | |
parent | 05810ff0eddb79450a100ae0d9db75e405d8d6be (diff) | |
download | FreeBSD-src-87505148a9a19bf8728986bf963fa5ded42762d8.zip FreeBSD-src-87505148a9a19bf8728986bf963fa5ded42762d8.tar.gz |
Support for >32 PTYs.
Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>
-rw-r--r-- | lib/libutil/pty.c | 4 | ||||
-rw-r--r-- | libexec/telnetd/sys_term.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c index 1644aee..4443f08 100644 --- a/lib/libutil/pty.c +++ b/lib/libutil/pty.c @@ -63,9 +63,9 @@ openpty(amaster, aslave, name, termp, winp) else ttygid = -1; - for (cp1 = "pqrs"; *cp1; cp1++) { + for (cp1 = "pqrsPQRS"; *cp1; cp1++) { line[8] = *cp1; - for (cp2 = "0123456789abcdef"; *cp2; cp2++) { + for (cp2 = "0123456789abcdefghijklmnopqrstuv"; *cp2; cp2++) { line[9] = *cp2; if ((master = open(line, O_RDWR, 0)) == -1) { if (errno == ENOENT) diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index abb732b..17b9606 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -507,7 +507,7 @@ int *ptynum; p2 = &line[14]; #endif - for (cp = "pqrstuvwxyzPQRST"; *cp; cp++) { + for (cp = "pqrsPQRS"; *cp; cp++) { struct stat stb; *p1 = *cp; @@ -519,8 +519,8 @@ int *ptynum; */ if (stat(line, &stb) < 0) break; - for (i = 0; i < 16; i++) { - *p2 = "0123456789abcdef"[i]; + for (i = 0; i < 32; i++) { + *p2 = "0123456789abcdefghijklmnopqrstuv"[i]; p = open(line, 2); if (p > 0) { #ifndef __hpux |