tech-kern archive

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

Re: Device node creation when major number is dynamically allocated



On 27 Jun 2014, at 04:17, Christos Zoulas <christos%zoulas.com@localhost> wrote:

> On Jun 27, 12:08pm, mrg%eterna.com.au@localhost (matthew green) wrote:
> -- Subject: re: Device node creation when major number is dynamically allocat
> 
> | > I don't see anything like that. Perhaps there should be a way to query
> | > a module about this. For now the only thing I can think of is to use
> | > sysctl to register the value, and then have something query the value
> | > of the sysctl variable you set in the module to find the device major
> | > number...
> | 
> | you mean like the pre-existing kern.drivers node? :-)
> 
> Yes, that one :-)

But doesn’t mknod automagically know the driver’s major number from its name? I 
always used to do:

mknod /dev/foo0 c foo 0

And “foo” got automatically resolved to the proper major number. Does that work 
for modules too?

-- 
Best regards,
Radoslaw Kujawa





Home | Main Index | Thread Index | Old Index