Re: init_module() knowing probe parameters

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Jan 28 2000 - 03:06:29 EST


On Thu, 27 Jan 2000 22:08:43 -0800,
David Schleef <ds@stm.lbl.gov> wrote:
>Is there an existing method for a module to discover the request_module()
>parameter that triggered its loading?

Short of running the process chain and extracting the command line to
modprobe, no.

>An alternative that I've considered is to use something similar to the
>following in /etc/conf.modules:
>
> alias char-major-98-2 whatever
> options whatever minor=2
>
>Is there any need for a kernel-wide solution to this, or does nobody
>really care?

Your code has control over the name that is passed to request_module.
I am not keen on kernel code asking for anything other than a single
name, it smacks too much of user policy migrating into the kernel.
Instead you can code /etc/modules.conf like this

alias char-major-98-1 comedi
options char-major-98-1 minor=1
alias char-major-98-2 comedi
options char-major-98-2 minor=2
options comedi major=98 irq=6 io=0x300

Options from the alias source and target are merged together before
calling insmod.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:20 EST