LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-06-2006, 10:26 PM   #1
BrooklynOutlier
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
request_region return code


I am running into problems using request_region(...). I am running Slackware 10.2 and gcc 3.3.6, and for all the world it looks like the code after the assignment to res is not working:

...
struct resource res;
...
res = request_region(kore_port, 3, "kore");
if (!res)
{
printk(KERN_ALERT "some message");
}
else
{
printk(KERN_ALERT "other message");
}
...

I don't see either message in the output, and I am seeing other KERN_ALERT messages before and after this. It is almost as if the prototype for the function doesn't match the actual function, and the return code is not on the stack ... I am a little rusty on C these days, so I can't really say that makes sense. Other than the messages, the code seems to be working, I can write to the port, etc.

I tried to find the source for the function underlying the macro request_region(...), but gave up after an hour (I am, indeed, a newbie). Any help would be appreciated.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios - Return code of 127 for check of service sriramsreedhar Linux - General 4 02-22-2014 03:54 PM
dd return code barefootdoctor Linux - General 2 10-13-2005 12:54 PM
Wine failed with return code 137 whishkah Linux - Software 2 06-13-2005 03:46 AM
return value from shell script to c code? khucinx Programming 1 05-13-2004 03:43 PM
Return code from main() using gcc Meatwad Programming 13 01-27-2004 06:36 PM


All times are GMT -5. The time now is 08:57 AM.

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