hi mulyadi,<br><br>i used syscall number 264 . and for the coding standard , can u tell me where am i off the track ?<br><br><br><br><div class="gmail_quote">On Tue, Feb 22, 2011 at 11:20 PM, Mulyadi Santosa <span dir="ltr"><<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Tue, Feb 22, 2011 at 22:18, mohit verma <<a href="mailto:mohit89mlnc@gmail.com">mohit89mlnc@gmail.com</a>> wrote:<br>
> hi all ,<br>
>><br>
>> i followed the link and tried to add a system call in kernel-version<br>
>> 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>
</div>which syscall number did you assigned to this syscall? and exactly how<br>
do you assign it?<br>
<br>
NB: your code style doesn't follow the Linux kernel coding standart....<br>
<font color="#888888"><br>
--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>........................<div><i>MOHIT VERMA</i></div><br>