Re: Passing Parameters to Module

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

 



Well, you could define module parameters as follows:

MODULE_PARAM(int_param, "i")

then passing value into module as

insmod module int_param=x

Cheers,

-Haijin
-----------------------------------------------------------
static void live(byte food, short sleep, const double work)
{  for(;;)
    future = NULL;
}
---------------------

On Tue, 21 Oct 2003, Josh Berry wrote:

> I am playing around with writing basic Loadable Modules and am trying to
> figure out how to write the module to accept parameters at load time.
> Like insmode <module_name> <parameters>.
>
> A Simple Example:
>
> Load the module and pass it the parameter of 100 and 10, the module
> divides 100 by ten, and then inputs the value to a syslog facility
> (printk(KERN_ALERT "%d", value);
>
> This is probably an incredibly simple exercise, but I am very new to
> playing with kernel development.
>
> Thanks
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux