cdev_notdef(), /* 9: SMD disk on Xylogics 450/451 */ cdev_notdef(), /* 10: systech multi-terminal board */ cdev_notdef(), /* 11: DES encryption chip */ cdev_tty_init(NZSTTY,zs), /* 12: Zilog 8530 serial port */ cdev_mouse_init(NMS+NSUNMS,ms), /* 13: /dev/mouse */ cdev_notdef(), /* 14: cgone */ cdev_notdef(), /* 15: sun /dev/winNNN */ cdev_log_init(1,log), /* 16: /dev/klog */ cdev_disk_init(NSD,sd), /* 17: SCSI disk */ cdev_tape_init(NST,st), /* 18: SCSI tape */ cdev_ch_init(NCH,ch), /* 19: SCSI autochanger */ cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */ cdev_ptc_init(NPTY,ptc), /* 21: pseudo-tty master */ cdev_fb_init(NFB,fb), /* 22: /dev/fb indirect driver */ cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */ cdev_fd_init(1,filedesc), /* 24: file descriptor pseudo-device */ cdev_notdef(), /* 25 */ cdev_disk_init(NWD,wd), /* 26: IDE disk */ cdev_fb_init(NBWTWO,bwtwo), /* 27: /dev/bwtwo */ cdev_notdef(), /* 28: Systech VPC-2200 versatec/centronics */ cdev_mouse_init(NKBD+NSUNKBD,kbd), /* 29: /dev/kbd */ cdev_notdef(), /* 30: Xylogics tape */ cdev_notdef(), /* 31: /dev/cgtwo */ cdev_notdef(), /* 32: should be /dev/gpone */ cdev_notdef(), /* 33 */ cdev_notdef(), /* 34 */ cdev_notdef(), /* 35 */ cdev_tty_init(NCOM,com), /* 36: NS16x50 compatible ports */ cdev_notdef(), /* 37 */ cdev_notdef(), /* 38 */ cdev_notdef(), /* 39: /dev/cgfour */
#include "clockctl.h" cdev_decl(clockctl); struct cdevsw cdevsw[] = { cdev_cn_init(1,cn), /* 0: virtual console */ cdev_ctty_init(1,ctty), /* 1: controlling terminal */ cdev_mm_init(1,mm), /* 2: /dev/{null,mem,kmem,...} */ cdev_swap_init(1,sw), /* 3: /dev/drum (swap pseudo-device) */ cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */ cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */ cdev_log_init(1,log), /* 6: /dev/klog */ cdev_bpftun_init(NTUN,tun), /* 7: network tunnel */ cdev_disk_init(NSD,sd), /* 8: SCSI disk */ cdev_disk_init(NVND,vnd), /* 9: vnode disk driver */ cdev_fd_init(1,filedesc), /* 10: file descriptor pseudo-dev */ cdev_bpftun_init(NBPFILTER,bpf),/* 11: Berkeley packet filter */ cdev_tape_init(NST,st), /* 12: SCSI tape */ cdev_disk_init(NCD,cd), /* 13: SCSI CD-ROM */ cdev_ch_init(NCH,ch), /* 14: SCSI autochanger */ #if NZSTTY > 0 cdev_tty_init(NZSTTY,zs), /* 15: SCC 8530 serial port tty */ #else cdev_tty_init(NSCC,scc), /* 15: scc 8530 serial interface */ #endif cdev_lkm_init(NLKM,lkm), /* 16: loadable module driver */ cdev_lkm_dummy(), /* 17 */ cdev_lkm_dummy(), /* 18 */ cdev_lkm_dummy(), /* 19 */ cdev_lkm_dummy(), /* 20 */ cdev_lkm_dummy(), /* 21 */
cdev_log_init(1,log), /* 6: /dev/klog */ cdev_notdef(), /* 7 */ cdev_ldisk_init(NSD,sd), /* 8: scsi disk */ cdev_notdef(), /* 9 */ cdev_fb_init(1,fb), /* 10: frame buffer */ cdev_notdef(), /* 11 */ cdev_tty_init(NSIO,sio), /* 12: built-in single-port serial */ cdev_tty_init(NBMC,bmc), /* 13: console terminal emulator */ cdev_kbd_init(2,kbd), /* 14: keyboard */ cdev_notdef(), /* 15 */ cdev_notdef(), /* 16 */ cdev_notdef(), /* 17 */ cdev_notdef(), /* 18 */ cdev_vn_init(NVN,vn), /* 19: vnode disk */ cdev_tape_init(NST,st), /* 20: scsi tape */ cdev_fd_init(1,fd), /* 21: file descriptor pseudo-dev */ cdev_bpf_init(NBPFILTER,bpf), /* 22: berkeley packet filter */ }; int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]); int mem_no = 2; /* major device number of memory special file */ /* * Swapdev is a fake device implemented * in sw.c used only internally to get to swstrategy. * It cannot be provided to the users, because the * swstrategy routine munches the b_dev and b_blkno entries * before calling the appropriate driver. This would horribly * confuse, e.g. the hashing routines. Instead, /dev/drum is * provided as a character (raw) device.