InterviewSolution
| 1. |
How Can I Use My Own Major And Minor Number For A Device File ? |
|
Answer» if you have the MAJOR and MINOR NUMBERS and need to turn them into a dev_t, use: register_chrdev_region works well if you know ahead of time exactly which device numbers you want. Often, however, you will not know which major numbers your device will use; there is a constant effort WITHIN the Linux KERNEL development community to move over to the use of dynamically-allocated device numbers. if you have the major and minor numbers and need to turn them into a dev_t, use: register_chrdev_region works well if you know ahead of time exactly which device numbers you want. Often, however, you will not know which major numbers your device will use; there is a constant effort within the Linux kernel development community to move over to the use of dynamically-allocated device numbers. |
|