From owner-freebsd-arch Sun Aug 5 15:20:29 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mass.dis.org (dhcp45-25.dis.org [216.240.45.25]) by hub.freebsd.org (Postfix) with ESMTP id DCA8037B415 for ; Sun, 5 Aug 2001 15:20:23 -0700 (PDT) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.4/8.11.3) with ESMTP id f75MMj100826; Sun, 5 Aug 2001 15:22:48 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200108052222.f75MMj100826@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Dima Dorfman Cc: Brian Somers , arch@FreeBSD.ORG, brian@freebsd-services.com Subject: Re: Library routine to load a kld if it already isn't In-reply-to: Your message of "Sun, 05 Aug 2001 09:06:01 PDT." <20010805160606.C985F3E35@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 05 Aug 2001 15:22:45 -0700 From: Mike Smith Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > Sharball of the implementation and man page is attached (extract into > > > src/lib/libc/gen). Comments? Suggestions? > > > > This is normally done with: > > > > if (modfind("module") == -1 && ID0kldload("module") == -1) > > errx(); > > > > I don't think it's a good idea to change this. > > Only it's wrong in some cases. Some modules will have a bus attached Please see ifmaybeload() in src/sbin/ifconfig/ifconfig.c. I would like to see a library function like kmodule_require(), which would take a *module* name and version number constrants similar to those taken by loadable modules themselves. -- ... 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] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message