From owner-freebsd-hackers Tue Nov 5 16: 3: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45B3137B401 for ; Tue, 5 Nov 2002 16:03:02 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4FB643E4A for ; Tue, 5 Nov 2002 16:03:01 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id gA6030E7004004; Tue, 5 Nov 2002 18:03:00 -0600 (CST) (envelope-from dan) Date: Tue, 5 Nov 2002 18:03:00 -0600 From: Dan Nelson To: Chuck Tuffli Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: load time module parameters? Message-ID: <20021106000300.GB1208@dan.emsphone.com> References: <20021105222958.GH17013@cre85086tuf.rose.agilent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021105222958.GH17013@cre85086tuf.rose.agilent.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Nov 05), Chuck Tuffli said: > I'm a newbie to FreeBSD and am wondering if there is a way to pass > loadable kernel modules parameters. Under Linux, if a module had > configurable parameters "a" and "b", you can do something like > > insmod module.o parameters="a:10 b:5" > > I noticed that some of the drivers grabed information from the > "environment" using getenv_int(), but I couldn't seem to get this to > work. Thanks for any thoughts. You can use /usr/bin/kenv to set kernel env variables, or you can have your module register a dynamic sysctl variable that the user can tweak after the module has been loaded. I've used the sysctl method myself and it works fine. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message