Lines Matching defs:pti
515 struct ptmx_ioctl *pti;
519 if ((pti = ptmx_get_ioctl(minor(dev), 0)) == NULL) {
522 tp = pti->pt_tty;
524 if (!(pti->pt_flags & PF_UNLOCKED)) {
554 pti->pt_flags |= PF_OPEN_S;
566 struct ptmx_ioctl *pti;
579 pti = ptmx_get_ioctl(minor(dev), 0);
581 if (pti == NULL || pti->pt_tty == NULL)
584 tp = pti->pt_tty;
612 struct ptmx_ioctl *pti;
618 pti = ptmx_get_ioctl(minor(dev), 0);
620 if (pti == NULL || pti->pt_tty == NULL)
623 tp = pti->pt_tty;
630 if (pti->pt_flags & PF_REMOTE) {
699 struct ptmx_ioctl *pti;
705 pti = ptmx_get_ioctl(minor(dev), 0);
707 if (pti == NULL || pti->pt_tty == NULL)
710 tp = pti->pt_tty;
728 struct ptmx_ioctl *pti;
731 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
733 if (pti == NULL)
741 if (pti->pt_flags & PF_STOPPED) {
742 pti->pt_flags &= ~PF_STOPPED;
743 pti->pt_send = TIOCPKT_START;
754 struct ptmx_ioctl *pti;
757 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
759 if (pti == NULL)
766 selwakeup(&pti->pt_selr);
770 selwakeup(&pti->pt_selw);
780 struct ptmx_ioctl *pti;
784 pti = ptmx_get_ioctl(minor(dev), PF_OPEN_M);
785 if (pti == NULL) {
787 } else if (pti == (struct ptmx_ioctl*)-1) {
790 tp = pti->pt_tty;
822 struct ptmx_ioctl *pti;
825 pti = ptmx_get_ioctl(minor(dev), 0);
827 if (pti == NULL || pti->pt_tty == NULL)
830 tp = pti->pt_tty;
863 struct ptmx_ioctl *pti;
868 pti = ptmx_get_ioctl(minor(dev), 0);
870 if (pti == NULL || pti->pt_tty == NULL)
873 tp = pti->pt_tty;
885 if (pti->pt_flags & PF_PKT && pti->pt_send) {
886 error = ureadc((int)pti->pt_send, uio);
889 if (pti->pt_send & TIOCPKT_IOCTL) {
895 pti->pt_send = 0;
898 if (pti->pt_flags & PF_UCNTL && pti->pt_ucntl) {
899 error = ureadc((int)pti->pt_ucntl, uio);
902 pti->pt_ucntl = 0;
918 if (pti->pt_flags & (PF_PKT|PF_UCNTL))
936 struct ptmx_ioctl *pti;
940 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
942 if (pti == NULL)
951 pti->pt_flags |= PF_STOPPED;
953 pti->pt_flags &= ~PF_STOPPED;
954 pti->pt_send |= flush;
1020 struct ptmx_ioctl *pti;
1023 pti = ptmx_get_ioctl(minor(dev), 0);
1025 if (pti == NULL || pti->pt_tty == NULL)
1028 tp = pti->pt_tty;
1055 struct ptmx_ioctl *pti;
1059 pti = ptmx_get_ioctl(minor(dev), 0);
1061 if (pti == NULL || pti->pt_tty == NULL)
1064 tp = pti->pt_tty;
1087 ((pti->pt_flags & PF_PKT && pti->pt_send) ||
1088 (pti->pt_flags & PF_UCNTL && pti->pt_ucntl))) {
1092 selrecord(p, &pti->pt_selr, wql);
1098 if (pti->pt_flags & PF_REMOTE) {
1114 selrecord(p, &pti->pt_selw, wql);
1139 struct ptmx_ioctl *pti;
1147 pti = ptmx_get_ioctl(minor(dev), 0);
1149 if (pti == NULL || pti->pt_tty == NULL)
1152 tp = pti->pt_tty;
1159 if (pti->pt_flags & PF_REMOTE) {
1262 struct ptmx_ioctl *pti;
1267 pti = ptmx_get_ioctl(minor(dev), 0);
1269 if (pti == NULL || pti->pt_tty == NULL)
1272 tp = pti->pt_tty;
1288 if (pti->pt_flags & PF_PKT) {
1289 pti->pt_send |= TIOCPKT_IOCTL;
1295 (pti->pt_flags & PF_PKT)) {
1296 pti->pt_send |= TIOCPKT_IOCTL;
1316 if (pti->pt_flags & PF_UCNTL) {
1320 pti->pt_flags |= PF_PKT;
1322 pti->pt_flags &= ~PF_PKT;
1327 if (pti->pt_flags & PF_PKT) {
1331 pti->pt_flags |= PF_UCNTL;
1333 pti->pt_flags &= ~PF_UCNTL;
1338 pti->pt_flags |= PF_REMOTE;
1340 pti->pt_flags &= ~PF_REMOTE;
1376 error = _devfs_setattr(pti->pt_devhandle, 0620, kauth_getuid(), GID_TTY);
1394 pti->pt_flags |= PF_UNLOCKED;
1402 if (pti->pt_flags & PF_UCNTL && (cmd & ~0xff) == UIOCCMD(0)) {
1405 pti->pt_ucntl = (u_char)cmd;
1428 if ((tp->t_lflag&EXTPROC) && (pti->pt_flags & PF_PKT)) {
1444 pti->pt_send |= TIOCPKT_IOCTL;
1452 if (pti->pt_flags & PF_NOSTOP) {
1454 pti->pt_send &= ~TIOCPKT_NOSTOP;
1455 pti->pt_send |= TIOCPKT_DOSTOP;
1456 pti->pt_flags &= ~PF_NOSTOP;
1461 pti->pt_send &= ~TIOCPKT_DOSTOP;
1462 pti->pt_send |= TIOCPKT_NOSTOP;
1463 pti->pt_flags |= PF_NOSTOP;