Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2006 10:55:38 +0530
From:      <sivakumar.subramani@wipro.com>
To:        <gurney_j@resnet.uoregon.edu>
Cc:        freebsd-net@FreeBSD.org
Subject:   RE: Reading a configuration file from a driver code during intialization.
Message-ID:  <956E7FA2615F3B4595FC5F22870A722108100C@blr-m3-msg.wipro.com>
In-Reply-To: <20060914161309.GC9421@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Mark,

=0D

As I mentioned in the previous mail, the main issue is to read a
Configuration parameter file from driver code. I am already using Sysctl
variables as mentioned below,

=0D

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.

=0D

This is a round about way. Is there is any other way to read a
configuration file from Driver code.

=0D

=0D

Thanks,

~Siva

-----Original Message-----
From: John-Mark Gurney [mailto:gurney_j@resnet.uoregon.edu]=0D
Sent: Thursday, September 14, 2006 9:43 PM
To: SIVAKUMAR SUBRAMANI (WT01 - Computing Systems & Storage)
Cc: freebsd-net@FreeBSD.org
Subject: Re: Reading a configuration file from a driver code during
intialization.

=0D

sivakumar.subramani@wipro.com wrote this message on Thu, Sep 14, 2006 at
12:16 +0530:

> Is there is any other solution to the above problem?

>=0D

>=0D

>=0D

> Actually I am looking for some thing similar to Module loadable

> parameters in the Linux Device Driver.

=0D

look at kenv...  It lets you set arbitrary values and access them in

the kernel...  you can use the TUNABLE_* macros provided by sys/kernel.h

to make accessing them easier...

=0D

If the variables need to change at run time, look at SYSCTL...

=0D

--=0D

  John-Mark Gurney                        Voice: +1 415 225 5579

=0D

     "All that I will do, has been done, All that I have, has not."




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.=0D

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.
=0D
www.wipro.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?956E7FA2615F3B4595FC5F22870A722108100C>