From owner-freebsd-hackers Tue Jul 11 15:48:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (ether.osd.bsdi.com [204.216.28.196]) by hub.freebsd.org (Postfix) with ESMTP id F22B137B74E for ; Tue, 11 Jul 2000 15:48:07 -0700 (PDT) (envelope-from msmith@mass.osd.bsdi.com) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.9.3/8.9.3) with ESMTP id PAA00718; Tue, 11 Jul 2000 15:54:04 -0700 (PDT) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200007112254.PAA00718@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Poul-Henning Kamp Cc: FreeBSD Hackers Subject: Re: Module parameters? In-reply-to: Your message of "Tue, 11 Jul 2000 23:38:37 +0200." <3453.963351517@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 11 Jul 2000 15:54:04 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message <396B8BBB.4AA1867D@lucent.com>, "Gary T. Corcoran" writes: > > >No, I know it's not that easy. We need to be able to do things > >like have "TransmissionMode=4" on the kldload command line, and > >have that parse the decimal value 4, and then go into the module > >and set the value of the TransmissionMode variable to actually be > >4 immediately after loading the module into memory, before any of > >its subroutines are called. This is what the Linux module loader > >allows, and it's extremely useful... > > I have a much simpler idea: > > The loader needs to pass an argc+argv to the modules "configure" > routine, and the module can do whatever it damn pleases with > the passed arguments. This was what I was originally contemplating, along with infrastructure for getopt-style helpers. However, having looked at the "Linux way" of doing things, I'm leaning towards a compromise solution. We have a couple of interesting issues to consider; for example, who gets which arguments when we load a file which contains several modules? Archie - I'd really appreciate a pointer to an example of using the ng_parse code to pick up this sort of data, if you can recommend something to help me get my head around it quickly (I've looked but slid off sideways so far...). Thanks -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message