Re: Suggestion for handling of boot-time driver options
Roderich Schupp (rsch@ExperTeam.de)
Tue, 16 Dec 1997 01:01:28 +0100
grant@torque.net said:
> I believe you misunderstood me. Of course the syntactic change is
> trivial, but I went on to discuss something a bit more elaborate:
> having the "MODULE_PARM" macro (which is used to specify which
> variables may be tuned from the insmod command line) also build the
> foo_setup function *automatically*. That would require some ELF
> magic, I believe.
I think you mean to use MODULE_PARM in non-MODULE code, too, e.g.
in driver foo.o:
MODULE_PARM(bar,"i");
MODULE_PARM(quux,"1-3i");
This should recognize boot options "foo.bar=1 foo.quux=2,3,4"
(resulting in bar=1, quux[0]=2, quux[1]=3, quux[2]=4 in foo.o). OK?
(If there's no "bar" option for "foo" registered, but an old-style
foo_setup is, we fall back to call that one with
foo_setup("bar,1", { 0, ...}) ).
Good idea, no problem at all. (Well, except for the MODULE_PARM macro
itself, I might need an additional parameter.)
Cheers, Roderich
--
Do not meddle in the affairs of wizards, for they are subtle and quick
to anger. Do not meddle in the affairs of dragons for you are crunchy
and taste good with ketchup. Do not meddle in the affairs of cats, for
they are subtle and will piss on your computer.
Roderich Schupp mailto:rsch@ExperTeam.de
ExperTeam GmbH http://www.experteam.de/
Munich, Germany Linux: 2.1.72