From owner-freebsd-hackers Mon Dec 31 15:18:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 386A137B416; Mon, 31 Dec 2001 15:18:40 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id fBVNRAj02362; Mon, 31 Dec 2001 15:27:11 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200112312327.fBVNRAj02362@mass.dis.org> To: Mike Barcroft Cc: Mike Smith , hackers@freebsd.org, msmith@mass.dis.org Subject: Re: loadable aio In-Reply-To: Message from Mike Barcroft of "Mon, 31 Dec 2001 03:48:07 EST." <20011231034807.D45114@espresso.q9media.com> Date: Mon, 31 Dec 2001 15:27:10 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > 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