Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Dec 2001 15:27:10 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Mike Barcroft <mike@freebsd.org>
Cc:        Mike Smith <msmith@freebsd.org>, hackers@freebsd.org, msmith@mass.dis.org
Subject:   Re: loadable aio 
Message-ID:  <200112312327.fBVNRAj02362@mass.dis.org>
In-Reply-To: Message from Mike Barcroft <mike@freebsd.org>  of "Mon, 31 Dec 2001 03:48:07 EST." <20011231034807.D45114@espresso.q9media.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > What part of searching a path for a matching file is "black magic"?  
> > 
> > Shells have been doing this for decades...
> 
> %%%
> /*
>  * Load /boot/kernel/procfs.ko
>  * XXX: why does this work?
>  */
> chdir("/");
> kldload("procfs");

You should only need the last kldload call.  Any other magic is probably
left over from times when kldload didn't work properly.

> If that's not black magic, I'd like to know what is.  I'd like to
> refer you to the kldload(2) manual, but unfortunately it doesn't
> document how kldload(2) works. :(

The synopsis for kldload(2) should be "find and load the named kernel
module".

In essence, it takes either a module name and searches the "right"
places for it, or it takes a fully-qualified pathname and loads
exactly that module.  That's all; anything else is a bug in the
implementation and should be fixed.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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