虽然为了兼容性目的指定主设备号和副号码作为参数是可能的,但不再需要这样了。
While it's possible to specify a major and minor number as arguments for compatibility purposes, this is no longer required.
与帧缓冲区有关的设备是 /dev/fb0(主设备号29,次设备号0)。
The device associated with the frame buffer is /dev/fb0 (Major Number 29, Minor Number 0).
当设备节点(特殊文件)创建后,它使用的主设备号必须同内核内部使用的完全相同。
When the device node (special file) is created, it must sport the exact same major number that is used internally by the kernel.
开发人员还可以选择动态地分配register _——?dev调用的设备的主设备号。
Alternatively, the developer could opt to have a major number dynamically assigned to the driver by the register_? Dev call.
当它们被访问时,内核通过devfs设备名称映射到合适的设备驱动程序,而不是通过主设备号。
When they are accessed, the kernel maps to the appropriate device driver by devfs device name, rather than by major number.
那么,设备驱动程序开发人员为调用register _——?dev提供的主设备号应该是什么呢?
So, what major number does the device driver developer supply with the call to register_? Dev ?
那么,在整个Linux世界中,这个特定的设备(也只有这个设备)才会被关联到那个特定的主设备号。
Then, throughout the Linux world, this particular device (and only this device) will be associated with this particular major number.
让特殊文件到内核驱动程序的映射成为可能的是主设备号,而不是真实的设备名称(它和非 devfs系统无关)。
The mapping from special file to kernel driver is made possible by the major number, not the actual device name, which is irrelevant to a non-devfs system.
您会记起在非 devfs系统上, register_blkdev()和 register_chrdev()调用(连同提供的主设备号)正是用于这一目的。
You'll recall that on a non-devfs system, the register_blkdev() and register_chrdev() calls (along with supplied major numbers) are used for this purpose.
您会记起在非 devfs系统上, register_blkdev()和 register_chrdev()调用(连同提供的主设备号)正是用于这一目的。
You'll recall that on a non-devfs system, the register_blkdev() and register_chrdev() calls (along with supplied major numbers) are used for this purpose.
应用推荐