summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-06-18 09:22:30 +0000
committerbrian <brian@FreeBSD.org>2001-06-18 09:22:30 +0000
commit59c2ccba3bab442c02ddb2ebaabe287ee6b6db53 (patch)
treead78a557576cb5d6b39fb7e83bc6f8b4b80cdea7 /sys/kern/tty_pty.c
parent6238970e0fc5194b7cd1d6622c5d40fa95c034f1 (diff)
downloadFreeBSD-src-59c2ccba3bab442c02ddb2ebaabe287ee6b6db53.zip
FreeBSD-src-59c2ccba3bab442c02ddb2ebaabe287ee6b6db53.tar.gz
Don't remove the SI_CHEAPCLONE for unsupported minors
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 37a3126..8672077 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -143,12 +143,13 @@ ptyinit(dev_t devc)
struct pt_ioctl *pt;
int n;
- devc->si_flags &= ~SI_CHEAPCLONE;
n = minor(devc);
/* For now we only map the lower 8 bits of the minor */
if (n & ~0xff)
return (NODEV);
+ devc->si_flags &= ~SI_CHEAPCLONE;
+
pt = malloc(sizeof(*pt), M_PTY, M_WAITOK | M_ZERO);
pt->devs = devs = make_dev(&pts_cdevsw, n,
UID_ROOT, GID_WHEEL, 0666, "tty%c%r", names[n / 32], n % 32);
OpenPOWER on IntegriCloud