LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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



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 5 11-14-2016 02:32 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration