tech-kern archive

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

re: Dynamic modules



> > 3. Is it possible to automatically create a device file in /dev from a
> >    module?
> 
> Not really, at least not from a loaded kernel module.

sure you can.  ipfilter was doing this back with LKMs in the 90s :-)

> BTW, devsw_attach() doesn't "automatically generate the major".  It does 
> a lookup in the majors table.  If there is no entry in the table, you 
> get an error.

see eg this line in devsw_attach():

                newptr = kmem_zalloc(new * DEVSWCONV_SIZE, KM_NOSLEEP);

for what happens when the entry isn't found.


.mrg.


Home | Main Index | Thread Index | Old Index