Commit | Line | Data |
---|---|---|
da7c5cc6 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1982, 1986 Regents of the University of California. |
da7c5cc6 KM |
3 | * All rights reserved. The Berkeley software License Agreement |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
e39f9ea6 | 6 | * @(#)tty_conf.c 7.3 (Berkeley) %G% |
da7c5cc6 | 7 | */ |
de2d206e | 8 | |
94368568 JB |
9 | #include "param.h" |
10 | #include "systm.h" | |
11 | #include "buf.h" | |
3358b36b | 12 | #include "ioctl.h" |
94368568 JB |
13 | #include "tty.h" |
14 | #include "conf.h" | |
de2d206e BJ |
15 | |
16 | int nodev(); | |
17 | int nulldev(); | |
18 | ||
605d7712 MK |
19 | int ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart(); |
20 | int ttymodem(), nullmodem(), ttyinput(); | |
de2d206e | 21 | |
e39f9ea6 MT |
22 | int ottyopen(), ottylclose(), ottread(), ottwrite(); |
23 | int ottyinput(), ottstart(), ottymodem(); | |
24 | ||
de2d206e BJ |
25 | #include "bk.h" |
26 | #if NBK > 0 | |
27 | int bkopen(),bkclose(),bkread(),bkinput(),bkioctl(); | |
28 | #endif | |
29 | ||
30 | #include "tb.h" | |
31 | #if NTB > 0 | |
32 | int tbopen(),tbclose(),tbread(),tbinput(),tbioctl(); | |
33 | #endif | |
5d6d0450 MK |
34 | #include "sl.h" |
35 | #if NSL > 0 | |
36 | int slopen(),slclose(),slinput(),sltioctl(),slstart(); | |
37 | #endif | |
38 | ||
de2d206e BJ |
39 | |
40 | struct linesw linesw[] = | |
41 | { | |
e39f9ea6 MT |
42 | ttyopen, ttylclose, ttread, ttwrite, nullioctl, |
43 | ttyinput, nodev, nulldev, ttstart, ttymodem, /* 0- termios */ | |
de2d206e | 44 | #if NBK > 0 |
e39f9ea6 MT |
45 | bkopen, bkclose, bkread, ttwrite, bkioctl, |
46 | bkinput, nodev, nulldev, ttstart, nullmodem, /* 1- NETLDISC */ | |
de2d206e BJ |
47 | #else |
48 | nodev, nodev, nodev, nodev, nodev, | |
49 | nodev, nodev, nodev, nodev, nodev, | |
50 | #endif | |
e39f9ea6 MT |
51 | nodev, nodev, nodev, nodev, nodev, /* 2- defunct */ |
52 | nodev, nodev, nodev, nodev, nodev, | |
de2d206e BJ |
53 | #if NTB > 0 |
54 | tbopen, tbclose, tbread, nodev, tbioctl, | |
5d6d0450 MK |
55 | tbinput, nodev, nulldev, ttstart, nullmodem, /* 3- TABLDISC */ |
56 | #else | |
57 | nodev, nodev, nodev, nodev, nodev, | |
58 | nodev, nodev, nodev, nodev, nodev, | |
59 | #endif | |
60 | #if NSL > 0 | |
61 | slopen, slclose, nodev, nodev, sltioctl, | |
87a0b374 | 62 | slinput, nodev, nulldev, slstart, nullmodem, /* 4- SLIPDISC */ |
de2d206e BJ |
63 | #else |
64 | nodev, nodev, nodev, nodev, nodev, | |
65 | nodev, nodev, nodev, nodev, nodev, | |
66 | #endif | |
de2d206e BJ |
67 | }; |
68 | ||
dc717036 | 69 | int nldisp = sizeof (linesw) / sizeof (linesw[0]); |
88a7a62a SL |
70 | |
71 | /* | |
72 | * Do nothing specific version of line | |
73 | * discipline specific ioctl command. | |
74 | */ | |
75 | /*ARGSUSED*/ | |
76 | nullioctl(tp, cmd, data, flags) | |
77 | struct tty *tp; | |
78 | char *data; | |
79 | int flags; | |
80 | { | |
81 | ||
82 | #ifdef lint | |
83 | tp = tp; data = data; flags = flags; | |
84 | #endif | |
85 | return (-1); | |
86 | } |