On Tue, Nov 26, 2013 at 4:36 PM, Nav Kamal <navkamal90@xxxxxxxxx> wrote:
Am a little stuck at major and minor numbers used to reference the connection between device file and device driver. Can please somebody theoretically explain how they work ?
In my opinion major and minor number are like device identifier. The combination of major and minor number (dev_t) is the deviceid. The major number is like an id of your driver. And all the devices that are using this driver will be having their own minor numbers. No two devices can have the same minor number if they are being controlled by the same driver. So when you create a device node , you specify the major and minor number with mknod command , and that means that particular node is associated with the driver (recognized by major number) and a particular device (recognized by the minor number).
Did i explain correctly or is my understanding wrong ???
Regards
Sudip
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies