Re: Minor Numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gaurav Dhiman wrote:
On Thu, 20 Jan 2005 04:55:20 -0800, Can Sar
<csar@xxxxxxxxxxxx> wrote:

Hi,

I wrote my own block device called sbd (using code

Minor numbers are NOT used to differentiate or recognize partitions, as you said. Actually there are
I beg to differ.
Please refer to LDD, chapter 12, page 361. Partitions are pulled based on the minor numbers.
two device numbers, Major and Minor Numbers for each
device file. These numbers are associated with each
device file and they have a place in device file's
inode. Major number is only important to the kernel.
Based on the major numbers, system calls are dispatched by kernel. One device driver is always registerd with the kernel specifying major number and file operations. (of cource, different structures for block and n/w devices)
Actually each device driver can handle more than one
device of same type or even of different types
(normally its of same type, for instance you normally
wont find a driver handling HDD, FDD and CD-ROM at the
same time, but its possible to write such drivers). As
This is new to me. Theoretically, it is possible. But I am yet to see one that works.

Regards,
Om.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux