Newby: how to check if a module is loaded in linux

I

insomniux

Hi,
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?

Insomniux
 
B

Ben Pope

insomniux said:
Hi,
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?

I'm sorry, but you appear to have posted this to the wrong newsgroup.

C cannot do this directly. C++ cannot do this directly.

Perhaps you intended to post this to a linux newsgroup?

I suspect that there are APIs for Linux that allow you to get that sort
of information.

OS specific information is not topical here.

Ben Pope
 
V

Victor Bazarov

insomniux said:
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?

For C questions consider 'comp.lang.c' newsgroup. We here talk C++. They
are two different languages (if you didn't know). But for Linux-specific
questions (like the one you've asked here), please post to the newsgroup
'comp.os.linux.development.system'.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top