[Gllug] How to check if module is in kernel ?

Nix nix at esperi.org.uk
Wed Nov 17 21:09:15 UTC 2010


On 16 Nov 2010, Jon Masters stated:

> On Mon, 2010-11-15 at 22:06 +0100, salsaman at xs4all.nl wrote:
>> > Do you see anything in the /sys/module directory?
>
>> Yes, sure, I see vloopback in there, but the original question was how to
>> tell if it was compiled into the kernel.
>
> You have some options, which include just parsing that directory and
> comparing with lsmod or /proc/modules output, using e.g. diff. But you

No, not 'how to tell if the thing was compiled in or was a module', more
'how to tell if something is available if it is compiled in, since one
cannot parse /proc/modules in that case.'

(Richard's answer was, of course, correct. Try whateveritis and watch
for an -ENOSYS, missing device, or analogue.)
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list