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
[EMAIL PROTECTED] | www.FreeBSD.org
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message