Major and minor numbers
From: Nav Kamal <hidden>
Date: 2013-11-28 04:10:49
On Nov 27, 2013 3:49 PM, "Sudip Mukherjee" [off-list ref] wrote:
On Tue, Nov 26, 2013 at 4:36 PM, Nav Kamal [off-list ref] wrote:quoted
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
Thanks , yes its correct . Finally understood the concept. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131128/e2c8ce3d/attachment.html