Research V7 development
[unix-history] / .ref-Research-V6 / usr / sys / conf.h
CommitLineData
0edd06b4
KT
1/*
2 * Used to dissect integer device code
3 * into major (driver designation) and
4 * minor (driver parameter) parts.
5 */
6struct
7{
8 char d_minor;
9 char d_major;
10};
11
12/*
13 * Declaration of block device
14 * switch. Each entry (row) is
15 * the only link between the
16 * main unix code and the driver.
17 * The initialization of the
18 * device switches is in the
19 * file conf.c.
20 */
21struct bdevsw
22{
23 int (*d_open)();
24 int (*d_close)();
25 int (*d_strategy)();
26 int *d_tab;
27} bdevsw[];
28
29/*
30 * Nblkdev is the number of entries
31 * (rows) in the block switch. It is
32 * set in binit/bio.c by making
33 * a pass over the switch.
34 * Used in bounds checking on major
35 * device numbers.
36 */
37int nblkdev;
38
39/*
40 * Character device switch.
41 */
42struct cdevsw
43{
44 int (*d_open)();
45 int (*d_close)();
46 int (*d_read)();
47 int (*d_write)();
48 int (*d_sgtty)();
49} cdevsw[];
50
51/*
52 * Number of character switch entries.
53 * Set by cinit/tty.c
54 */
55int nchrdev;