This source file includes following definitions.
- nullioctl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 #include <sys/param.h>
41 #include <sys/systm.h>
42 #include <sys/ioctl.h>
43 #include <sys/proc.h>
44 #include <sys/tty.h>
45 #include <sys/conf.h>
46
47 #define ttynodisc ((int (*)(dev_t, struct tty *))enodev)
48 #define ttyerrclose ((int (*)(struct tty *, int flags))enodev)
49 #define ttyerrio ((int (*)(struct tty *, struct uio *, int))enodev)
50 #define ttyerrinput ((int (*)(int c, struct tty *))enodev)
51 #define ttyerrstart ((int (*)(struct tty *))enodev)
52
53 int nullioctl(struct tty *, u_long, caddr_t, int, struct proc *);
54
55 #include "sl.h"
56 #if NSL > 0
57 int slopen(dev_t dev, struct tty *tp);
58 int slclose(struct tty *tp, int flags);
59 int sltioctl(struct tty *tp, u_long cmd, caddr_t data,
60 int flag, struct proc *p);
61 int slinput(int c, struct tty *tp);
62 int slstart(struct tty *tp);
63 #endif
64
65 #include "ppp.h"
66 #if NPPP > 0
67 int pppopen(dev_t dev, struct tty *tp);
68 int pppclose(struct tty *tp, int flags);
69 int ppptioctl(struct tty *tp, u_long cmd, caddr_t data,
70 int flag, struct proc *p);
71 int pppinput(int c, struct tty *tp);
72 int pppstart(struct tty *tp);
73 int pppread(struct tty *tp, struct uio *uio, int flag);
74 int pppwrite(struct tty *tp, struct uio *uio, int flag);
75 #endif
76
77 #include "strip.h"
78 #if NSTRIP > 0
79 int stripopen(dev_t dev, struct tty *tp);
80 int stripclose(struct tty *tp, int flags);
81 int striptioctl(struct tty *tp, u_long cmd, caddr_t data,
82 int flag, struct proc *p);
83 int stripinput(int c, struct tty *tp);
84 int stripstart(struct tty *tp);
85 #endif
86
87 #include "nmea.h"
88 #if NNMEA > 0
89 int nmeaopen(dev_t, struct tty *);
90 int nmeaclose(struct tty *, int);
91 int nmeainput(int, struct tty *);
92 #endif
93
94 struct linesw linesw[] =
95 {
96 { ttyopen, ttylclose, ttread, ttwrite, nullioctl,
97 ttyinput, ttstart, ttymodem },
98
99 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
100 ttyerrinput, ttyerrstart, nullmodem },
101
102 #if defined(COMPAT_43) || defined(COMPAT_FREEBSD) || defined(COMPAT_BSDOS)
103 { ttyopen, ttylclose, ttread, ttwrite, nullioctl,
104 ttyinput, ttstart, ttymodem },
105 #else
106 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
107 ttyerrinput, ttyerrstart, nullmodem },
108 #endif
109
110
111 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
112 ttyerrinput, ttyerrstart, nullmodem },
113
114 #if NSL > 0
115 { slopen, slclose, ttyerrio, ttyerrio, sltioctl,
116 slinput, slstart, nullmodem },
117 #else
118 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
119 ttyerrinput, ttyerrstart, nullmodem },
120 #endif
121
122 #if NPPP > 0
123 { pppopen, pppclose, pppread, pppwrite, ppptioctl,
124 pppinput, pppstart, ttymodem },
125 #else
126 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
127 ttyerrinput, ttyerrstart, nullmodem },
128 #endif
129
130 #if NSTRIP > 0
131 { stripopen, stripclose, ttyerrio, ttyerrio, striptioctl,
132 stripinput, stripstart, nullmodem },
133 #else
134 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
135 ttyerrinput, ttyerrstart, nullmodem },
136 #endif
137
138 #if NNMEA > 0
139 { nmeaopen, nmeaclose, ttread, ttwrite, nullioctl,
140 nmeainput, ttstart, ttymodem },
141 #else
142 { ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
143 ttyerrinput, ttyerrstart, nullmodem },
144 #endif
145 };
146
147 int nlinesw = sizeof (linesw) / sizeof (linesw[0]);
148
149
150
151
152
153
154 int
155 nullioctl(struct tty *tp, u_long cmd, char *data, int flags, struct proc *p)
156 {
157
158 #ifdef lint
159 tp = tp; data = data; flags = flags; p = p;
160 #endif
161 return (-1);
162 }