Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 1998 16:33:09 +1100 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        current@FreeBSD.ORG
Subject:   Kernel module syscall inconsistencies
Message-ID:  <199812160533.QAA14070@cimlogic.com.au>

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



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