xref: /original-bsd/sys/sys/conf.h (revision fbed46ce)
1 /*	conf.h	4.8	81/10/17	*/
2 
3 /*
4  * Declaration of block device
5  * switch. Each entry (row) is
6  * the only link between the
7  * main unix code and the driver.
8  * The initialization of the
9  * device switches is in the
10  * file conf.c.
11  */
12 struct bdevsw
13 {
14 	int	(*d_open)();
15 	int	(*d_close)();
16 	int	(*d_strategy)();
17 	int	(*d_dump)();
18 	int	d_flags;
19 };
20 #ifdef KERNEL
21 struct	bdevsw bdevsw[];
22 #endif
23 
24 /*
25  * Character device switch.
26  */
27 struct cdevsw
28 {
29 	int	(*d_open)();
30 	int	(*d_close)();
31 	int	(*d_read)();
32 	int	(*d_write)();
33 	int	(*d_ioctl)();
34 	int	(*d_stop)();
35 	int	(*d_reset)();
36 	struct tty *d_ttys;
37 	int	(*d_select)();
38 };
39 #ifdef KERNEL
40 struct	cdevsw cdevsw[];
41 #endif
42 
43 /*
44  * tty line control switch.
45  */
46 struct linesw
47 {
48 	int	(*l_open)();
49 	int	(*l_close)();
50 	int	(*l_read)();
51 	char	*(*l_write)();
52 	int	(*l_ioctl)();
53 	int	(*l_rint)();
54 	int	(*l_rend)();
55 	int	(*l_meta)();
56 	int	(*l_start)();
57 	int	(*l_modem)();
58 };
59 #ifdef KERNEL
60 struct	linesw linesw[];
61 #endif
62 
63 /*
64  * Swap device information
65  */
66 struct swdevt
67 {
68 	dev_t	sw_dev;
69 	int	sw_freed;
70 };
71 #ifdef KERNEL
72 struct	swdevt swdevt[];
73 #endif
74