Reputation: 68
Where does the module parameter stored while loading a driver module with module parameter.I need to automate such that if i load a module it will load with that parameter enabled. eg if I need to load a module net_dev.ko with a module parameter hw_enable=1 So I need to do-
modprobe net_dev hw_enable=1
to load it with that option But I want when I do-
modprobe net_dev
It will automatically take hw_enable=1 So for that where should i kept this module parameter in the kernel?
Upvotes: 0
Views: 201
Reputation: 66
Options are provided in the configuration file for the module to be installed in the /etc/modprobe.d/ directory. So in your case if you create a file net_dev.conf in /etc/modprobe.d directory with the following line
options net_dev hw_enable=1
and you call modprobe net_dev, it should execute modprobe net_dev hw_enable=1
Upvotes: 3