On Thu, Jun 10, 2004 at 19:58:05 +0530, aksingh@hss.hns.com wrote: > can I do a getenv in my module, to get an environment variable ?. suppose Your module is not a process. Thus it does not have environment. > I want to set the loglevels of my module, how do i set it from outside ? Module can have parameters (passed when the module is inserted). The interface is simple -- the loader just sets the passed value in a provided global variable in the module. Module parameters are declared with MODULE_PARM macro. Just use that macro on top-level in main .c file of your module to create parameters. Something like: static int loglevel; MODULE_PARM(loglevel, "i"); MODULE_PARM_DESC(logleve, "Amount of verbosity of the module (0-quiet - 4-very verbose)") This is correct for kernel 2.4. For 2.6 kernel, it seems to be deprecated, but I am not sure what is a replacement. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz>
Attachment:
signature.asc
Description: Digital signature