|
|
1.1 ! root 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.4 (Berkeley) 5/1/89 ! 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: int ottyopen(), ottylclose(), ottread(), ottwrite(); ! 23: int ottyinput(), ottstart(), ottymodem(); ! 24: ! 25: #include "tb.h" ! 26: #if NTB > 0 ! 27: int tbopen(),tbclose(),tbread(),tbinput(),tbioctl(); ! 28: #endif ! 29: #include "sl.h" ! 30: #if NSL > 0 ! 31: int slopen(),slclose(),slinput(),sltioctl(),slstart(); ! 32: #endif ! 33: ! 34: ! 35: struct linesw linesw[] = ! 36: { ! 37: ttyopen, ttylclose, ttread, ttwrite, nullioctl, ! 38: ttyinput, nodev, nulldev, ttstart, ttymodem, /* 0- termios */ ! 39: ! 40: nodev, nodev, nodev, nodev, nodev, /* 1- defunct */ ! 41: nodev, nodev, nodev, nodev, nodev, ! 42: ! 43: nodev, nodev, nodev, nodev, nodev, /* 2- defunct */ ! 44: nodev, nodev, nodev, nodev, nodev, ! 45: #if NTB > 0 ! 46: tbopen, tbclose, tbread, nodev, tbioctl, ! 47: tbinput, nodev, nulldev, ttstart, nullmodem, /* 3- TABLDISC */ ! 48: #else ! 49: nodev, nodev, nodev, nodev, nodev, ! 50: nodev, nodev, nodev, nodev, nodev, ! 51: #endif ! 52: #if NSL > 0 ! 53: slopen, slclose, nodev, nodev, sltioctl, ! 54: slinput, nodev, nulldev, slstart, nullmodem, /* 4- SLIPDISC */ ! 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: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.