LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-05-2005, 12:44 AM   #1
node047
LQ Newbie
 
Registered: Mar 2005
Location: india
Posts: 12

Rep: Reputation: 0
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
 
Old 04-05-2005, 01:35 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,766

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Querying RPM dhirsolo Linux - Newbie 8 07-27-2005 07:34 AM
querying modules node047 General 0 04-06-2005 12:14 PM
Cshell querying two files... HiOctane21 Programming 1 05-01-2004 07:19 PM
aliases.db not querying CC field jules_fraser Linux - Networking 0 01-19-2004 02:48 PM
Querying motherboard liguorir Linux - Software 1 09-02-2003 10:22 AM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration