1/*- 2 * Copyright (c) 1982, 1986, 1991, 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_tty.c 8.2 (Berkeley) 9/23/93 |
34 * $Id: tty_tty.c,v 1.24 1998/06/07 17:11:44 dfr Exp $ |
35 */ 36 37/* 38 * Indirect driver for controlling tty. 39 */ 40 41#include "opt_devfs.h" 42 --- 10 unchanged lines hidden (view full) --- 53#endif /*DEVFS*/ 54 55static d_open_t cttyopen; 56static d_read_t cttyread; 57static d_write_t cttywrite; 58static d_ioctl_t cttyioctl; 59static d_poll_t cttypoll; 60 |
61#define CDEV_MAJOR 1 62/* Don't make this static, since fdesc_vnops uses it. */ 63struct cdevsw ctty_cdevsw = { 64 cttyopen, nullclose, cttyread, cttywrite, 65 cttyioctl, nullstop, nullreset, nodevtotty, 66 cttypoll, nommap, NULL, "ctty", 67 NULL, -1, nodump, nopsize, 68 D_TTY, 69}; |
70 |
71#define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL) 72 73/*ARGSUSED*/ 74static int 75cttyopen(dev, flag, mode, p) 76 dev_t dev; 77 int flag, mode; 78 struct proc *p; --- 128 unchanged lines hidden --- |