/* * Used to dissect integer device code * into major (driver designation) and * minor (driver parameter) parts. */ struct { char pad_0; /***/ char pad_1; /***/ char d_major; /***/ char d_minor; /***/ }; /* * Declaration of block device * switch. Each entry (row) is * the only link between the * main unix code and the driver. * The initialization of the * device switches is in the * file conf.c. */ extern struct bdevsw /***/ { int (*d_open)(); int (*d_close)(); int (*d_strategy)(); int *d_tab; } bdevsw[]; /* * Nblkdev is the number of entries * (rows) in the block switch. It is * set in binit/bio.c by making * a pass over the switch. * Used in bounds checking on major * device numbers. */ extern int nblkdev; /***/ /* * Character device switch. */ extern struct cdevsw /***/ { int (*d_open)(); int (*d_close)(); int (*d_read)(); int (*d_write)(); int (*d_sgtty)(); } cdevsw[]; /* * Number of character switch entries. * Set by cinit/tty.c */ extern int nchrdev; /***/