|
Home > Archive > Unix questions > November 2006 > what is device major and minor number?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
what is device major and minor number?
|
|
|
| Hi All,
I want to know device major and minor number concept. can any one
explain it to me?
Thanks
Venky
| |
| Ed Morton 2006-11-16, 1:30 am |
| venky wrote:
> Hi All,
>
> I want to know device major and minor number concept. can any one
> explain it to me?
A quick google on "major and minor number" produces
http://uw714doc.sco.com/en/HDK_concepts/ddT_majmin.html and several
others. You might want to try google first in future.
Ed.
| |
| Kaz Kylheku 2006-11-17, 1:22 pm |
| venky wrote:
> Hi All,
>
> I want to know device major and minor number concept. can any one
> explain it to me?
The two numbers are stored in special file type, "character special" or
"block special" file. When that file is opened, the resulting file
descriptor is connected to the driver which is identified by the major
number. The minor number is simply an extra parameter that is passed to
the driver during the open, allowing multiple device files to refer to
the same driver, yet be distinguished from each other by that driver.
(The driver doesn't see the name which was used to open it: all it goes
by is the minor number). Minor numbers are a necessary flexibility,
making it possible for one driver to provide multiple device instances,
multiple behaviors for one device, or anything else that needs to be
distinguished: for instance logical partitions on a disk block device.
|
|
|
|
|