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