1 /* 2 * Copyright (c) 1982, 1986 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)tty_conf.c 7.5 (Berkeley) 02/28/91 7 */ 8 9 #include "param.h" 10 #include "systm.h" 11 #include "buf.h" 12 #include "ioctl.h" 13 #include "tty.h" 14 #include "conf.h" 15 16 int enodev(); 17 int nullop(); 18 19 int ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart(); 20 int ttymodem(), nullmodem(), ttyinput(); 21 22 #include "tb.h" 23 #if NTB > 0 24 int tbopen(),tbclose(),tbread(),tbinput(),tbioctl(); 25 #endif 26 27 #include "sl.h" 28 #if NSL > 0 29 int slopen(),slclose(),slinput(),sltioctl(),slstart(); 30 #endif 31 32 33 struct linesw linesw[] = 34 { 35 ttyopen, ttylclose, ttread, ttwrite, nullioctl, 36 ttyinput, enodev, nullop, ttstart, ttymodem, /* 0- termios */ 37 38 enodev, enodev, enodev, enodev, enodev, /* 1- defunct */ 39 enodev, enodev, enodev, enodev, enodev, 40 41 enodev, enodev, enodev, enodev, enodev, /* 2- defunct */ 42 enodev, enodev, enodev, enodev, enodev, 43 #if NTB > 0 44 tbopen, tbclose, tbread, enodev, tbioctl, 45 tbinput, enodev, nullop, ttstart, nullmodem, /* 3- TABLDISC */ 46 #else 47 enodev, enodev, enodev, enodev, enodev, 48 enodev, enodev, enodev, enodev, enodev, 49 #endif 50 #if NSL > 0 51 slopen, slclose, enodev, enodev, sltioctl, 52 slinput, enodev, nullop, slstart, nullmodem, /* 4- SLIPDISC */ 53 #else 54 enodev, enodev, enodev, enodev, enodev, 55 enodev, enodev, enodev, enodev, enodev, 56 #endif 57 }; 58 59 int nldisp = sizeof (linesw) / sizeof (linesw[0]); 60 61 /* 62 * Do nothing specific version of line 63 * discipline specific ioctl command. 64 */ 65 /*ARGSUSED*/ 66 nullioctl(tp, cmd, data, flags) 67 struct tty *tp; 68 char *data; 69 int flags; 70 { 71 72 #ifdef lint 73 tp = tp; data = data; flags = flags; 74 #endif 75 return (-1); 76 } 77