Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 2000 00:16:31 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        "Gary T. Corcoran" <gcorcoran@lucent.com>
Cc:        FreeBSD Hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: Setting device options
Message-ID:  <Pine.BSF.4.21.0004150010280.40655-100000@resnet.uoregon.edu>
In-Reply-To: <38F63C11.860C901B@lucent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Apr 2000, Gary T. Corcoran wrote:

> So, I want to know how I can "automagically" set the device options,
> every time a user kldload's the device driver.
> To give you a little background, here's how it works on the other
> operating systems, and thus this is the type of thing I'm looking
> for in FreeBSD.

I'm not sure this is the model you want.  

In general, kld's get loaded once and stay there, usually at boot time.  
I would find it easier (and orthogonal with existing practice) to have a
xxcontrol program (like siocontrol & friends) that parses a config file or
command line options or what have you and passes them via an ioctl() to
the driver.  This reduces the startup complexity of your driver, and
simple drivers are Good(tm).

If you make your code available, there will be people who will want to
statically compile the driver in, and you don't have a load event to pull
arguments from in that instance.  (I'm thinking of PicoBSD as an
environment that doesn't bundle kernel modules.)

Doug White                    |  FreeBSD: The Power to Serve
dwhite@resnet.uoregon.edu     |  www.FreeBSD.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004150010280.40655-100000>