diff options
author | ed <ed@FreeBSD.org> | 2010-01-13 21:22:23 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-01-13 21:22:23 +0000 |
commit | a6d91cab94ec23762b485567141800ca5a89c3c1 (patch) | |
tree | 24a03323812e11af0730f6883aa9756d2568429b | |
parent | 6bc46506163ea6a3bcf17069c043fe68da3067bc (diff) | |
download | FreeBSD-src-a6d91cab94ec23762b485567141800ca5a89c3c1.zip FreeBSD-src-a6d91cab94ec23762b485567141800ca5a89c3c1.tar.gz |
Remove the 1000 pseudo terminal limit from pts(4).
Even with the old utmp format, we could in fact go to pts/9999, because
ut_line wasn't guaranteed to be null terminated there.
-rw-r--r-- | share/man/man4/pts.4 | 26 | ||||
-rw-r--r-- | sys/kern/tty_pts.c | 8 |
2 files changed, 0 insertions, 34 deletions
diff --git a/share/man/man4/pts.4 b/share/man/man4/pts.4 index d0e8832..88eb29c 100644 --- a/share/man/man4/pts.4 +++ b/share/man/man4/pts.4 @@ -136,12 +136,6 @@ This should not be used directly. It is used to implement routines like .Xr grantpt 3 . .El -.Pp -The maximum number of pseudo-terminals is limited to 1000. -It is not possible to use more than 1000 pseudo-terminals, as all software -which use -.Xr utmp 5 -will not be able to handle pseudo-terminals with number superior to 999. .Sh FILES The files used by this pseudo-terminals implementation are: @@ -150,26 +144,6 @@ pseudo-terminals implementation are: .It Pa /dev/pts/[num] Pseudo-terminal slave devices. .El -.Sh SYSCTL VARIABLES -The following -.Xr sysctl 8 -variables can be used to modify or monitor -.Nm -behavior. -.Bl -tag -width indent -.It Va kern.pts_maxdev -Highest pseudo-terminal unit number to be allocated. -Because -.Xr utmp 5 -is restricted to an 8-byte line name size, -.Nm -will not create any pseudo-terminals with a unit number above 999 by -default. -After increasing -.Dv UT_LINESIZE , -this variable can be changed to allow more than 1000 pseudo-terminals to -be allocated simultaneously. -.El .Sh DIAGNOSTICS None. .Sh SEE ALSO diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c index 632175b..290fdc2 100644 --- a/sys/kern/tty_pts.c +++ b/sys/kern/tty_pts.c @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); * UT_LINESIZE. */ static struct unrhdr *pts_pool; -static unsigned int pts_maxdev = 999; -SYSCTL_UINT(_kern, OID_AUTO, pts_maxdev, CTLFLAG_RW, &pts_maxdev, 0, - "Maximum amount of pts(4) pseudo-terminals"); static MALLOC_DEFINE(M_PTS, "pts", "pseudo tty device"); @@ -725,11 +722,6 @@ pts_alloc(int fflags, struct thread *td, struct file *fp) chgptscnt(uid, -1, 0); return (EAGAIN); } - if (unit > pts_maxdev) { - free_unr(pts_pool, unit); - chgptscnt(uid, -1, 0); - return (EAGAIN); - } /* Allocate TTY and softc. */ psc = malloc(sizeof(struct pts_softc), M_PTS, M_WAITOK|M_ZERO); |