1 /* 2 * Copyright (c) 1982 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 6.6 (Berkeley) 11/04/85 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 nodev(); 17 int nulldev(); 18 19 int ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart(); 20 int ttymodem(), nullmodem(), ttyinput(); 21 22 #include "bk.h" 23 #if NBK > 0 24 int bkopen(),bkclose(),bkread(),bkinput(),bkioctl(); 25 #endif 26 27 #include "tb.h" 28 #if NTB > 0 29 int tbopen(),tbclose(),tbread(),tbinput(),tbioctl(); 30 #endif 31 32 struct linesw linesw[] = 33 { 34 ttyopen, ttylclose, ttread, ttwrite, nullioctl, 35 ttyinput, nodev, nulldev, ttstart, ttymodem, 36 #if NBK > 0 37 bkopen, bkclose, bkread, ttwrite, bkioctl, 38 bkinput, nodev, nulldev, ttstart, nullmodem, 39 #else 40 nodev, nodev, nodev, nodev, nodev, 41 nodev, nodev, nodev, nodev, nodev, 42 #endif 43 ttyopen, ttylclose, ttread, ttwrite, nullioctl, 44 ttyinput, nodev, nulldev, ttstart, ttymodem, 45 #if NTB > 0 46 tbopen, tbclose, tbread, nodev, tbioctl, 47 tbinput, nodev, nulldev, ttstart, nullmodem, /* 3 */ 48 #else 49 nodev, nodev, nodev, nodev, nodev, 50 nodev, nodev, nodev, nodev, nodev, 51 #endif 52 #if NTB > 0 53 tbopen, tbclose, tbread, nodev, tbioctl, 54 tbinput, nodev, nulldev, ttstart, nullmodem, /* 4 */ 55 #else 56 nodev, nodev, nodev, nodev, nodev, 57 nodev, nodev, nodev, nodev, nodev, 58 #endif 59 }; 60 61 int nldisp = sizeof (linesw) / sizeof (linesw[0]); 62 63 /* 64 * Do nothing specific version of line 65 * discipline specific ioctl command. 66 */ 67 /*ARGSUSED*/ 68 nullioctl(tp, cmd, data, flags) 69 struct tty *tp; 70 char *data; 71 int flags; 72 { 73 74 #ifdef lint 75 tp = tp; data = data; flags = flags; 76 #endif 77 return (-1); 78 } 79 80 /* 81 * Default modem control routine. 82 * Return argument flag, to turn off device on carrier drop. 83 */ 84 nullmodem(flag) 85 int flag; 86 { 87 88 return (flag); 89 } 90