On 11-04-08 11:56, Robert P. J. Day wrote:
i know well enough that, if i write and load a driver that allocates a device major number and one or more minor numbers, i can see the allocated major number via /proc/devices. but is there a userspace way to see the minor number(s)? or, as LDD3 implies, it's my job to just *know* what those would have been? thanks.
Just idle interest -- I see the lowercase "I" more and more these days. Is it a kiddospeak thing or is that actually finding its way into the English language?
Historically, no way. The driver just gets everything for its registered major and has to switch on minor itself. That is, no such thing as "allocated" minors as far as the system is concerned.
Newishly though, we have class_create() and device_create() which do provide minors with more of a role. For exaple, if you look at /sys/class/mem, you see subdirectories according to its minors.
The "historic" driver is far from obsolete though, so the best answer is "if you're lucky, but don't count on it".
Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ