Don't remove the SI_CHEAPCLONE for unsupported minors
This commit is contained in:
parent
2deed49982
commit
21ff14e0f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78405
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user