pty.c (32726) | pty.c (33826) |
---|---|
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 | 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.49 1997/12/16 17:40:28 eivind Exp $ | 34 * $Id: tty_pty.c,v 1.50 1998/01/24 02:54:35 eivind 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" --- 628 unchanged lines hidden (view full) --- 671 } 672 return(0); 673 } else 674 if (cdevsw[major(dev)]->d_open == ptcopen) 675 switch (cmd) { 676 677 case TIOCGPGRP: 678 /* | 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" --- 628 unchanged lines hidden (view full) --- 671 } 672 return(0); 673 } else 674 if (cdevsw[major(dev)]->d_open == ptcopen) 675 switch (cmd) { 676 677 case TIOCGPGRP: 678 /* |
679 * We aviod calling ttioctl on the controller since, | 679 * We avoid calling ttioctl on the controller since, |
680 * in that case, tp must be the controlling terminal. 681 */ 682 *(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : 0; 683 return (0); 684 685 case TIOCPKT: 686 if (*(int *)data) { 687 if (pti->pt_flags & PF_UCNTL) --- 97 unchanged lines hidden (view full) --- 785 pti->pt_send |= TIOCPKT_NOSTOP; 786 pti->pt_flags |= PF_NOSTOP; 787 ptcwakeup(tp, FREAD); 788 } 789 } 790 return (error); 791} 792 | 680 * in that case, tp must be the controlling terminal. 681 */ 682 *(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : 0; 683 return (0); 684 685 case TIOCPKT: 686 if (*(int *)data) { 687 if (pti->pt_flags & PF_UCNTL) --- 97 unchanged lines hidden (view full) --- 785 pti->pt_send |= TIOCPKT_NOSTOP; 786 pti->pt_flags |= PF_NOSTOP; 787 ptcwakeup(tp, FREAD); 788 } 789 } 790 return (error); 791} 792 |
793static ptc_devsw_installed = 0; | 793static int ptc_devsw_installed; |
794 795static void ptc_drvinit __P((void *unused)); 796static void 797ptc_drvinit(unused) 798 void *unused; 799{ 800#ifdef DEVFS 801 int i,j,k; --- 27 unchanged lines hidden --- | 794 795static void ptc_drvinit __P((void *unused)); 796static void 797ptc_drvinit(unused) 798 void *unused; 799{ 800#ifdef DEVFS 801 int i,j,k; --- 27 unchanged lines hidden --- |