tech-kern archive

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

re: Dynamic modules



matthew green writes:
> 
> > > 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.
> 
> err, and this doesn't generate a major.  the function itself
> needs you to pass them in, so your idea of hard coding is as
> good as any today.

as Jared points out, it does work, and you can see that this happens
in [bc]devsw_attach().


Home | Main Index | Thread Index | Old Index