[Gllug] How to check if module is in kernel ?
Richard Jones
rich at annexia.org
Mon Nov 15 14:34:43 UTC 2010
On Mon, Nov 15, 2010 at 12:12:01PM +0000, Dylan wrote:
> On Monday 15 Nov 2010, Richard Jones wrote:
> > Looking for some evidence of the module by what devices, proc entries
> > or sys entries it exports is the right thing to do. A variation on
> > this is to open and use the API blindly, and catch the errors when
> > specific API calls fail because the module is not present.
>
> I'm not a developer at all, but it seems strange that there is no recognised
> method for obtaining this information from the kernel - surely it must
> maintain a list of loaded and compiled in modules? How does lsmod get the
> information?
I'm pretty sure this list is *not* maintained actually.
Of course you could enumerate a list of things registered via all the
different kernel subsystems that support registration. Good luck ...
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list