Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Aug 2001 15:22:45 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Dima Dorfman <dima@unixfreak.org>
Cc:        Brian Somers <brian@Awfulhak.org>, arch@FreeBSD.ORG, brian@freebsd-services.com
Subject:   Re: Library routine to load a kld if it already isn't 
Message-ID:  <200108052222.f75MMj100826@mass.dis.org>
In-Reply-To: Your message of "Sun, 05 Aug 2001 09:06:01 PDT." <20010805160606.C985F3E35@bazooka.unixfreak.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108052222.f75MMj100826>