Date: Thu, 13 Apr 2000 19:02:19 -0700 From: Mike Smith <msmith@freebsd.org> To: "Gary T. Corcoran" <gcorcoran@lucent.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Setting device options Message-ID: <200004140202.TAA01265@mass.cdrom.com> In-Reply-To: Your message of "Thu, 13 Apr 2000 17:28:49 EDT." <38F63C11.860C901B@lucent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> So, I want to know how I can "automagically" set the device options, > every time a user kldload's the device driver. If you want to support this mode of operation, you really don't have a lot of options right now. This is, in one fashion at least, my fault. Sorry. 8( I would be inclined, given the way things currently are, to create a sysctl in your driver, and then hang most of your attach routine off the sysctl write handler. ie. you actually perform the "real" attach when the sysctl is written (and then disable this so re-writing it doesn't do it again...) > Is there some equivalent way of handling device driver option settings > in FreeBSD? I would prefer an "automatic" way of having the > device options set, similar in function to the way you can set > options for your ethernet card with the ifconfig command - so > that once you define, for example, your ifconfig command and > put it in your rc file, you just automatically bring things up > the desired way. Any suggestions? (For FreeBSD 4.x) Well, teaching kldload about module parameters would make it into 4.1, if that's good enough. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com 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?200004140202.TAA01265>