System Call Return Values
Hi all,
This is my first post but I have been coming to the site for a long time now.
I have a question regarding creating my own system calls in Ubuntu(version 2.6.35).
I have created my system calls and they work perfectly with the exception that when I check the return value for known bad input in my driver file (how I am calling and testing my system calls) I always receive a negative one. I know my system calls are working because when I use the dmesg command I can see what the system calls are returning right before they return.
When I give valid input my return values match with those in my driver file, what I expect, and the values returned from dmesg. Does anyone have any idea what the reason for this is?
Thanks,
-Jeff
sample output:
Output from dmesg:
[ 2030.296446] rmMbox421:
[ 2030.296447] Mailbox ID: 9
[ 2030.296457] Mailbox 9 could not be removed (DNE).
[ 2030.296461] **Remove Mailbox returned -3
Output from proj2Driver.c:
0) Hello World
1) Create Mailbox
2) Remove Mailbox
3) Count Mailbox
4) List Mailbox
5) Send Message
10) Quit
Enter Option: 2
Enter Mailbox ID: 9
Result from rmMbox421: -1
|