I'm trying to add a simple syscall addition in the kernel and after compilation and reboot the syscall is returning -1. May I know what is the issue here?
I have added this to syscalls.master:
Checked added lines in sysproto.h and added the functions in kern_event.c source file after this kernel is compiled and server is rebooted
Now I wrote a simple program to check how the syscall works but it's returning -1 for all values.
Can anybody help me and tell me where I might have gone wrong?
Thanks
BR
Saurabh
I have added this to syscalls.master:
Code:
441 MSTD BSD { int test(int x, int y); }
Checked added lines in sysproto.h and added the functions in kern_event.c source file after this kernel is compiled and server is rebooted
Now I wrote a simple program to check how the syscall works but it's returning -1 for all values.
Code:
#include<unistd.h>
#include<stdio.h>
int main()
{
int b;
b=syscall(441,4,5);
printf("The addition is %d\n\n\n",b);
return 0;
}
Thanks
BR
Saurabh