tty_tty.c (47625) | tty_tty.c (47640) |
---|---|
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 | 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.25 1998/08/23 08:26:42 bde Exp $ | 34 * $Id: tty_tty.c,v 1.26 1999/05/30 16:53:00 phk Exp $ |
35 */ 36 37/* 38 * Indirect driver for controlling tty. 39 */ 40 41#include "opt_devfs.h" 42 --- 155 unchanged lines hidden (view full) --- 198static void *ctty_devfs_token; 199#endif 200 201static void ctty_drvinit __P((void *unused)); 202static void 203ctty_drvinit(unused) 204 void *unused; 205{ | 35 */ 36 37/* 38 * Indirect driver for controlling tty. 39 */ 40 41#include "opt_devfs.h" 42 --- 155 unchanged lines hidden (view full) --- 198static void *ctty_devfs_token; 199#endif 200 201static void ctty_drvinit __P((void *unused)); 202static void 203ctty_drvinit(unused) 204 void *unused; 205{ |
206 dev_t dev; | |
207 208 if( ! ctty_devsw_installed ) { | 206 207 if( ! ctty_devsw_installed ) { |
209 dev = makedev(CDEV_MAJOR,0); 210 cdevsw_add(&dev,&ctty_cdevsw,NULL); | 208 cdevsw_add(&ctty_cdevsw); |
211 ctty_devsw_installed = 1; 212#ifdef DEVFS 213 ctty_devfs_token = 214 devfs_add_devswf(&ctty_cdevsw, 0, DV_CHR, 0, 0, 215 0666, "tty"); 216#endif 217 } 218} 219 220SYSINIT(cttydev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ctty_drvinit,NULL) | 209 ctty_devsw_installed = 1; 210#ifdef DEVFS 211 ctty_devfs_token = 212 devfs_add_devswf(&ctty_cdevsw, 0, DV_CHR, 0, 0, 213 0666, "tty"); 214#endif 215 } 216} 217 218SYSINIT(cttydev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ctty_drvinit,NULL) |