When the device node (special file) is created, it must sport the exact same major number that is used internally by the kernel.
当设备节点(特殊文件)创建后,它使用的主设备号必须同内核内部使用的完全相同。
In response, devfs_register adds the foo0 device node to the root of the devfs namespace, and records that this new foo0 node should map to the foo device driver in the kernel.
相应的,devfs_register在devfs名称空间的根目录添加foo0设备节点,并记录这个新的foo0节点应该映射到内核中的foo设备驱动程序。
The above rule says: match a device which was named by the kernel as hdb AND where the driver is ide-disk. Name the device node with the default name and create a symbolic link to it named sparedisk.
上面规则意思是:匹配一个内核命名为hdb以及驱动为ide-disk的设备,命名设备节点为缺省名字,同时创建一个指向它的名为sparedisk的符号链接。
应用推荐