hi all ,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">i followed the link and tried to add a system call in kernel-version 2.6.37 <br>
here is the code :<br><br><br>#include<linux/linkage.h> <br>#include<linux/kernel.h><br>#include<linux/fs.h> //for getname<br>
#include<linux/err.h> //for PTR_ERR<br>asmlinkage int sys_hariohm(const char __user *filename) <br>{<br> char *tmp = getname(filename);<br> int fd=PTR_ERR(tmp);<br> if (!IS_ERR(tmp)) <br> {<br>
printk("filename %s \n",tmp);<br>
putname(tmp);<br> return fd;<br> }<br> else<br> {<br> return 2;<br> }<br>}<br><br><br>the compilation process was silent (without any error).<br> but when i try to boot into the kernel having this system call , i get the errors like :<br>
<br>do_exit() ,do_group_exit() , syscall_init() error lines with some addresses.<br><br>can someone help me understand what is wrong with this code?<br><br>thanks in advance :)<br clear="all"><br></blockquote><div>and also when i tried to boot into this kernel , it was showing some <b>initrafs</b> error.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">-- <br>........................<div>
<i>MOHIT VERMA</i></div><font color="#888888"><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>........................<div><i>MOHIT VERMA</i></div><br>