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

Re: Inserting module



On Sat, Oct 05, 2002 at 04:12:34PM +0100, John Levon wrote:
> On Sat, Oct 05, 2002 at 05:50:25AM +0000, rajeev naidu wrote:
> 
> > Is there any mechanism avail to insert module from a program apart from 
> > "system() and exec()". I wanne to load a module and pass some values to the 
> > loaded module. Is there any mechanism avail for this? Any help will be 
> 
> Exactly like modutils does it. Check the source.
> 
> It's non-trivial to get properly right though.

If you need to pass anything to the module, you can still use insmod.
Just mark the variables you might want to set as parameters (using
MODULE_PARM macro) and then pass insmod parameters in the form
name=value where name is name of that variable and value is appropriate
string representation of the value. Both strings and numbers can be set
and AFAIK number of parameters is not limited.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/