summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pts.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-13 21:22:23 +0000
committered <ed@FreeBSD.org>2010-01-13 21:22:23 +0000
commita6d91cab94ec23762b485567141800ca5a89c3c1 (patch)
tree24a03323812e11af0730f6883aa9756d2568429b /sys/kern/tty_pts.c
parent6bc46506163ea6a3bcf17069c043fe68da3067bc (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys/kern/tty_pts.c')
-rw-r--r--sys/kern/tty_pts.c8
1 files changed, 0 insertions, 8 deletions
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);
OpenPOWER on IntegriCloud