Subject: Re: LKM support for many filesystems as well as compat_freebsd
To: tech-kern@NetBSD.ORG, Michael Graff <explorer@cygnus.com>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: tech-kern
Date: 08/12/1996 13:27:25
Excerpts from netbsd: 11-Aug-96 LKM support for many filesy.. Michael
Graff@cygnus.com (538)

[more than 1 function in a loadable module]

> Does anyone have any suggestions on how to extend the lkm interface
> to make things work better for this sort of thing, without hacks?

I have an extended LKM interface, supporting exactly this, running
for some months.
In principle, the "_module" structure is replaced by an array of
such structures.
The initialization looks a bit ugly, eg
---------------------
MOD_DRV(ottodrv, &ottocftable, "pci")
MOD_DEV(ottodev, LM_DT_CHAR, -1, &ottosw)

BEGIN_MODFUNCS(otto)
USE_MODFUNC(ottodrv)
USE_MODFUNC(ottodev)
END_MODFUNCS
---------------------
However, it is at least a try...
I'm still not very sure about error handling - what to
do if one of the submodules cannot initialized or
de-initialized properly. Also, there is the unsolved
problem of module cross-dependencies.

best regards
Matthias Drochner