Reading a configuration file from a driver code during intialization.

sivakumar.subramani at wipro.com sivakumar.subramani at wipro.com
Wed Sep 13 23:52:34 PDT 2006


Hi all,



For our driver we have following requirement. We have a configuration
file that will be updated by the user and while loading the driver, the
initialization code should read the configuration file to get the value
and use it in the driver code.



Is there is any way to read a configuration file from driver code?



Currently I have written a small kernel module that will create a sysctl
variable and update with a default value. After loading this module,
using shell scripts, I read the configuration file and get the user set
values and update the sysctl variable in that value. Then I will load my
driver where I read the sysctl variable to get the required values set
by the user in the configuration file.



Is there is any other solution to the above problem?



Actually I am looking for some thing similar to Module loadable
parameters in the Linux Device Driver.



Thanks,

~Siva




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


More information about the freebsd-net mailing list