From owner-freebsd-hackers Thu Apr 13 18:56:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (mass.cdrom.com [204.216.28.184]) by hub.freebsd.org (Postfix) with ESMTP id DA9CB37B55C for ; Thu, 13 Apr 2000 18:56:13 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id TAA01265; Thu, 13 Apr 2000 19:02:19 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200004140202.TAA01265@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Gary T. Corcoran" Cc: FreeBSD Hackers Subject: Re: Setting device options In-reply-to: Your message of "Thu, 13 Apr 2000 17:28:49 EDT." <38F63C11.860C901B@lucent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Apr 2000 19:02:19 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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