mulyadi , i followed the link https://sites.google.com/a/ce-jmi.edu.in/tarique/adding-a-system-call-to-lin... . modified files are: 1. /usr/src/kernels/linux-2.6.37/arch/x86/kernel/syscall_table_32.S 2. /usr/src/kernels/linux-2.6.37/include/asm-frv/unistd.h 3. /usr/src/kernels/linux-2.6.37/include/linux/syscalls.h 4. /usr/src/kernels/linux-2.6.37/Makefile and i added: 1. #define __NR_hariohm 264 __SYSCALL(__NR_hariohm, sys_hariohm) in unistd.h file. 2.asmlinkage int sys_hariohm(const char __user *filename); in file syscalls.h 3. .long sys_hariohm /* our system call */ in syscall_table_32.S 4 core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ *hariohm/* in makefile On Tue, Feb 22, 2011 at 11:40 PM, Mulyadi Santosa <mulyadi.santosa@gmail.com
wrote:
On Wed, Feb 23, 2011 at 01:01, mohit verma <mohit89mlnc@gmail.com> wrote:
hi mulyadi,
i used syscall number 264 . and for the coding standard , can u tell me where am i off the track ?
Exactly, how do you add "264" as the syscall number? the diff...I mean...
NB: find lindent script for style reformatting...
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
-- ........................ *MOHIT VERMA*
On Wed, Feb 23, 2011 at 01:19, mohit verma <mohit89mlnc@gmail.com> wrote:
and i added: 1. #define __NR_hariohm 264 __SYSCALL(__NR_hariohm, sys_hariohm) in unistd.h file.
grepping inside unistd.h, I got #undef __NR_syscalls #define __NR_syscalls 264 So, it seems that you violate one rule: you add a syscall but didn't increase the number of total syscalls registered. Am I right or am I right? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
ok mulyadi , i got u late what u wanted to see . here are the diff files sorry for delay. On Wed, Feb 23, 2011 at 12:09 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com
wrote:
On Wed, Feb 23, 2011 at 01:19, mohit verma <mohit89mlnc@gmail.com> wrote:
and i added: 1. #define __NR_hariohm 264 __SYSCALL(__NR_hariohm, sys_hariohm) in unistd.h file.
grepping inside unistd.h, I got
#undef __NR_syscalls #define __NR_syscalls 264
So, it seems that you violate one rule: you add a syscall but didn't increase the number of total syscalls registered.
Am I right or am I right?
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
-- ........................ *MOHIT VERMA*
On Tue, Feb 22, 2011 at 6:44 PM, mohit verma <mohit89mlnc@gmail.com> wrote:
ok mulyadi , i got u late what u wanted to see . here are the diff files sorry for delay.
There is a good illustration of "how to add syscalls to kernel" y given in Robert Love's book LKD, refer it. when you attach files like these please follow a convention like naming them as mypatch.patch, mypatch.diff or even mypatch.txt. not all mail clients can read these files and may drop them. Please DON'T top post, its annoying. For coding standards please refer for coding style guide by Linus, its inside the Documentation directory inside the kernel source. There are many utilities like patchcheck.pl and indent, which can make your code more readable. -A
On Wed, Feb 23, 2011 at 12:09 AM, Mulyadi Santosa < mulyadi.santosa@gmail.com> wrote:
On Wed, Feb 23, 2011 at 01:19, mohit verma <mohit89mlnc@gmail.com> wrote:
and i added: 1. #define __NR_hariohm 264 __SYSCALL(__NR_hariohm, sys_hariohm) in unistd.h file.
grepping inside unistd.h, I got
#undef __NR_syscalls #define __NR_syscalls 264
So, it seems that you violate one rule: you add a syscall but didn't increase the number of total syscalls registered.
Am I right or am I right?
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
-- ........................ *MOHIT VERMA*
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (3)
-
Anuz Pratap Singh Tomar -
mohit verma -
Mulyadi Santosa