Skip to content

Commit

Permalink
Support for >32 PTYs.
Browse files Browse the repository at this point in the history
Submitted by:	Heikki Suonsivu <[email protected]>
  • Loading branch information
Jordan K. Hubbard authored and Jordan K. Hubbard committed Feb 9, 1995
1 parent a871684 commit 1338e00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/libutil/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions libexec/telnetd/sys_term.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 1338e00

Please sign in to comment.