Major and minor numbers
Sudip Mukherjee
sudipm.mukherjee at gmail.com
Wed Nov 27 05:19:35 EST 2013
On Tue, Nov 26, 2013 at 4:36 PM, Nav Kamal <navkamal90 at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131127/7d54ca17/attachment.html
More information about the Kernelnewbies
mailing list