4600: /* Used to dissect integer device code
4601: * into major (driver designation) and
4602: * minor (driver parameter) parts.
4603: */
4604: struct {
4605: char d_minor;
4606: char d_major;
4607: };
4608: /* --------------------------- */
4609: /* Declaration of block device
4610: * switch. Each entry (row) is
4611: * the only link between the
4612: * main unix code and the driver.
4613: * The initialization of the
4614: * device switches is in the
4615: * file conf.c.
4616: */
4617: struct bdevsw {
4618: int (*d_open)();
4619: int (*d_close)();
4620: int (*d_strategy)();
4621: int *d_tab;
4622: } bdevsw[];
4623: /* --------------------------- */
4624: /* Nblkdev is the number of entries
4625: * (rows) in the block switch. It is
4626: * set in binit/bio.c by making
4627: * a pass over the switch.
4628: * Used in bounds checking on major
4629: * device numbers.
4630: */
4631: int nblkdev;
4632:
4633: /* Character device switch.
4634: */
4635: struct cdevsw {
4636: int (*d_open)();
4637: int (*d_close)();
4638: int (*d_read)();
4639: int (*d_write)();
4640: int (*d_sgtty)();
4641: } cdevsw[];
4642: /* --------------------------- */
4643:
4644: /* Number of character switch entries.
4645: * Set by cinit/tty.c
4646: */
4647: int nchrdev;