From owner-freebsd-hackers Fri Jul 9 0:28:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 2FCF214D18 for ; Fri, 9 Jul 1999 00:28:27 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id QAA24679; Fri, 9 Jul 1999 16:28:18 +0900 (JST) Message-ID: <37859151.349BF7DA@newsguy.com> Date: Fri, 09 Jul 1999 15:06:09 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Kelly Yancey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: new loader question / module question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ok, ok, this message is a few months old, but better late than never, right? (<-- retorical question, no need to actually answer... ;) Kelly Yancey wrote: > > I was working on a module and need to be able to pass parameters to the > module (preferably without having to compile them in). I noticed that the > splash module does this (sort of) by having you load the image to display > and specifying a "tag" for it so that the module can scan for the tag and > find the image. I need to be able to pass more than a single configuration > option though. I am considering putting all of the configuration options > into a single config file, having that loaded into memory by the boot > loader (much the way the splash module loads it's image) and then when the > module loads it can scan memory for the configuration information and > parse it. Is there a better way? It might not be better, but it's an alternative way. Loader saves any arguments passed to a module at load time under the tag MODINFO_ARGS, which can be retrieved (I suppose -- if the kernel does not junk it somewhere) with preload_search_info(). -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message