LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   querying the modules (http://www.linuxquestions.org/questions/linux-general-1/querying-the-modules-309828/)

node047 04-05-2005 12:44 AM

querying the modules
 
can anyone please tell me watss the error in the following code

size_t *ret, bufsize;
void *buf = (void *)malloc(3000);
query_module(NULL,QM_INFO,buf,bufsize,ret);

its giving me error: EFAULT

bigrigdriver 04-05-2005 01:35 AM

It would help a lot to know which language you're programming.
I'll assume C.
First and second lines of the code, you list pointers *ret and *buf.
Third line, you list the memory locations directly, instead of the pointers.


All times are GMT -5. The time now is 03:18 AM.