Kernel device associations
Mike.McCarty at sbcglobal.net
Fri Mar 12 10:09:47 PST 2010
Not quite on-topic, possibly.
I have only a hazy understanding of how the association between
physical devices and device nodes in /dev gets made. AIUI, the
"node" is just a special file, similar in actual use to a (usually)
empty directory used to mount file systems. The true file gets
overlaid by the information contained in the actual physical
device, when the device driver for it gets loaded, and finds the
Is that basic understanding more or less correct?
If so, then how does the actual association take place? Anyone here
enough of a kernel expert to know, or should I look elsewhere?
ISTM, just thinking about it, that the driver must look for its
hardware, and if it finds it, then it assigns it a major number
and minor number(s) as it finds internal luns, and then makes a
call out to some internal kernel routine which does the "install"
by making note of that, and possibly puts some info in the /dev
file. After that, when the device node is accessed, the kernel makes
note of the fact that it has been overlaid, and uses the information
it stored away to tell it how to make calls to the device driver.
Is that basically correct?
How does the kernel decide which device node to use?
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!
More information about the lfs-support