Setting options

Module writers can include lines like this, from drivers/net/tulip.c

MODULE_AUTHOR("Donald Becker ");
MODULE_DESCRIPTION("Digital 21*4* Tulip ethernet driver");
MODULE_PARM(debug, "i");
MODULE_PARM(max_interrupt_work, "i");
MODULE_PARM(reverse_probe, "i");
MODULE_PARM(rx_copybreak, "i");
MODULE_PARM(csr0, "i");
MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");

Each MODULE_PARM defines the name and type of a parameter that can be set when the module is loaded. "i" is a single integer. "1-ni" is up to n integers. insmod sets these variables but the module code determines how they are used. Each module should have some documentation on what options can be set and what they do, that is the job of the module writer, not modutils.

Manual load, set the option on the insmod command line.

insmod tulip debug=3 csr0=0xdeadbeef options=,,,3

Automatic load, set the options in /etc/modules.conf

options tulip debug=3 csr0=0xdeadbeef options=,,,3

©Keith Owens O. C. Software P/L 2000