From a6d91cab94ec23762b485567141800ca5a89c3c1 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 13 Jan 2010 21:22:23 +0000 Subject: 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. --- sys/kern/tty_pts.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sys/kern/tty_pts.c') 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); -- cgit v1.1