cdev_pf_init(NPF,pf), /* 73: packet filter */ cdev_notdef(), /* 74: ALTQ (deprecated) */ cdev_notdef(), cdev_radio_init(NRADIO, radio), /* 76: generic radio I/O */ cdev_notdef(), /* 77: was USB scanners */ cdev_systrace_init(NSYSTRACE,systrace), /* 78: system call tracing */ cdev_bio_init(NBIO,bio), /* 79: ioctl tunnel */ cdev_notdef(), /* 80: gpr? XXX */ cdev_ptm_init(NPTY,ptm), /* 81: pseudo-tty ptm device */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 82: devices hot plugging */ cdev_acpi_init(NACPI,acpi), /* 83: ACPI */ cdev_notdef(), cdev_nvram_init(NNVRAM,nvram), /* 85: NVRAM interface */ cdev_notdef(), /* 86 */ cdev_drm_init(NDRM,drm), /* 87: drm */ cdev_gpio_init(NGPIO,gpio), /* 88: gpio */ cdev_vscsi_init(NVSCSI,vscsi), /* 89: vscsi */ cdev_disk_init(1,diskmap), /* 90: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 91: pppx */ cdev_fuse_init(NFUSE,fuse), /* 92: fuse */ cdev_tun_init(NTUN,tap), /* 93: Ethernet network tunnel */ cdev_tty_init(NVIOCON,viocon), /* 94: virtio console */ cdev_pvbus_init(NPVBUS,pvbus), /* 95: pvbus(4) control interface */ }; int nchrdev = nitems(cdevsw); 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.
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_notdef(), /* 3 was /dev/drum */ 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_fd_init(1,filedesc), /* 7: file descriptor pseudo-device */ cdev_ksyms_init(NKSYMS,ksyms), /* 8: Kernel symbols device */ cdev_lpt_init(NLPT,lpt), /* 9: parallel printer */ cdev_lkm_dummy(), /* 10: */ cdev_lkm_dummy(), /* 11: */ cdev_tty_init(NCOM,com), /* 12: serial port */ cdev_gpio_init(NGPIO,gpio), /* 13: GPIO interface */ cdev_notdef(), /* 14 was alternate serial port */ cdev_lkm_dummy(), /* 15: */ cdev_disk_init(NWD,wd), /* 16: ST506/ESDI/IDE disk */ cdev_lkm_dummy(), /* 17: */ cdev_disk_init(NRD,rd), /* 18: ram disk driver */ cdev_disk_init(NVND,vnd), /* 19: vnode disk driver */ cdev_lkm_dummy(), /* 20: */ cdev_notdef(), /* 21: was: concatenated disk driver */ cdev_bpf_init(NBPFILTER,bpf), /* 22: Berkeley packet filter */ cdev_lkm_dummy(), /* 23: */ cdev_disk_init(NSD,sd), /* 24: SCSI disk */ cdev_tape_init(NST,st), /* 25: SCSI tape */ cdev_disk_init(NCD,cd), /* 26: SCSI CD-ROM */ cdev_ch_init(NCH,ch), /* 27: SCSI autochanger */ cdev_uk_init(NUK,uk), /* 28: SCSI unknown */