Deleted Added
sdiff udiff text old ( 46676 ) new ( 47203 )
full compact
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95
34 * $Id: tty_pty.c,v 1.56 1999/04/27 11:16:19 phk Exp $
35 */
36
37/*
38 * Pseudo-teletype Driver
39 * (Actually two drivers, requiring two entries in 'cdevsw')
40 */
41#include "pty.h" /* XXX */
42#include "opt_compat.h"

--- 626 unchanged lines hidden (view full) ---

669 if ((tp->t_lflag & EXTPROC) &&
670 (pti->pt_flags & PF_PKT)) {
671 pti->pt_send |= TIOCPKT_IOCTL;
672 ptcwakeup(tp, FREAD);
673 }
674 tp->t_lflag &= ~EXTPROC;
675 }
676 return(0);
677 } else
678 if (devsw(dev)->d_open == ptcopen)
679 switch (cmd) {
680
681 case TIOCGPGRP:
682 /*
683 * We avoid calling ttioctl on the controller since,
684 * in that case, tp must be the controlling terminal.
685 */
686 *(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : 0;

--- 19 unchanged lines hidden (view full) ---

706
707 case TIOCREMOTE:
708 if (*(int *)data)
709 pti->pt_flags |= PF_REMOTE;
710 else
711 pti->pt_flags &= ~PF_REMOTE;
712 ttyflush(tp, FREAD|FWRITE);
713 return (0);
714
715#ifdef COMPAT_43
716 case TIOCSETP:
717 case TIOCSETN:
718#endif
719 case TIOCSETD:
720 case TIOCSETA:
721 case TIOCSETAW:
722 case TIOCSETAF:

--- 7 unchanged lines hidden (view full) ---

730 if ((tp->t_lflag&NOFLSH) == 0)
731 ttyflush(tp, FREAD|FWRITE);
732 pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
733 if ((*(unsigned int *)data == SIGINFO) &&
734 ((tp->t_lflag&NOKERNINFO) == 0))
735 ttyinfo(tp);
736 return(0);
737 }
738 error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
739 if (error == ENOIOCTL)
740 error = ttioctl(tp, cmd, data, flag);
741 if (error == ENOIOCTL) {
742 if (pti->pt_flags & PF_UCNTL &&
743 (cmd & ~0xff) == UIOCCMD(0)) {
744 if (cmd & 0xff) {
745 pti->pt_ucntl = (u_char)cmd;

--- 87 unchanged lines hidden ---