From owner-freebsd-current Tue Dec 15 21:20:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA24030 for freebsd-current-outgoing; Tue, 15 Dec 1998 21:20:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA24021 for ; Tue, 15 Dec 1998 21:20:22 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id QAA14070 for current@freebsd.org; Wed, 16 Dec 1998 16:33:09 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199812160533.QAA14070@cimlogic.com.au> Subject: Kernel module syscall inconsistencies To: current@FreeBSD.ORG Date: Wed, 16 Dec 1998 16:33:09 +1100 (EST) X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ I'm new to kernel modules. ] kldload() can be passed a kernel module filename with path and the kernel links the module as expected, stripping the path and assigning the module name to just foo.ko (instead of ../../foo.ko or /somepath/somewhere/foo.ko). kldfind(), on the otherhand, wants just the module name after the kernel has silently stripped the path. I was expecting to format a string containing the explicit filename I wanted to load (under test, before any eventual installation on /modules), call kldfind to see if the module was already loaded and if not, pass the same string to kldload(). This code results in *lots* of copies of the same module getting loaded -- until I noticed, that is. I think kldfind() should accept the string with the path and behave like kldload() does. And kldload() shouldn't allow more than one module of a particular name. Comments? -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message