|
|
| version 1.11, 2004/05/13 23:49:23 | version 1.12, 2004/05/19 22:52:58 |
|---|---|
| Line 177 ptsopen(dev_t dev, int flag, int devtype | Line 177 ptsopen(dev_t dev, int flag, int devtype |
| struct tty *tp; | struct tty *tp; |
| int error; | int error; |
| int minr; | int minr; |
| #if 0 | |
| dev_t nextdev; | dev_t nextdev; |
| #endif | |
| struct pt_ioctl *pti; | struct pt_ioctl *pti; |
| struct proc *p; | struct proc *p; |
| p = td->td_proc; | p = td->td_proc; |
| KKASSERT(p != NULL); | KKASSERT(p != NULL); |
| minr = lminor(dev); | |
| #if 0 | |
| /* | /* |
| * XXX: Gross hack for DEVFS: | * REMOVED gross hack for devfs. also note that makedev() |
| * XXX: DEVFS is no more, should this be removed? | * no longer exists in this form and reference counting makes |
| * If we openned this device, ensure we have the | * this a problem if we don't clean it out later. |
| * next one too, so people can open it. | |
| */ | */ |
| minr = lminor(dev); | |
| if (minr < 255) { | if (minr < 255) { |
| nextdev = makedev(major(dev), minr + 1); | nextdev = make_sub_dev(dev, minr + 1); |
| if (!nextdev->si_drv1) { | if (!nextdev->si_drv1) { |
| ptyinit(minr + 1); | ptyinit(minr + 1); |
| } | } |
| } | } |
| #endif | |
| if (!dev->si_drv1) | if (!dev->si_drv1) |
| ptyinit(minor(dev)); | ptyinit(minor(dev)); |
| if (!dev->si_drv1) | if (!dev->si_drv1) |
| Line 831 static void | Line 834 static void |
| ptc_drvinit(unused) | ptc_drvinit(unused) |
| void *unused; | void *unused; |
| { | { |
| cdevsw_add(&pts_cdevsw); | cdevsw_add(&pts_cdevsw, 0, 0); |
| cdevsw_add(&ptc_cdevsw); | cdevsw_add(&ptc_cdevsw, 0, 0); |
| /* XXX: Gross hack for DEVFS */ | /* XXX: Gross hack for DEVFS */ |
| /* XXX: DEVFS is no more, should this be removed? */ | /* XXX: DEVFS is no more, should this be removed? */ |
| ptyinit(0); | ptyinit(0); |