[clug] Re: Hello,martin
mbp at samba.org
Sat Apr 26 09:05:56 EST 2003
On 25 Apr 2003, "??@??" <zpeak at 163.com> wrote:
> Hello Mattin :
> I am very glad to received your answer ,Tks very much.
> I know call the sys_* must from userspace ,so i translate the space from kernelspace to userspace ,
> mm_segment_t old_fs =get_fs() ;
> set_fs(new_fs) ;
> fd = sys_open(pathname,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
> printk("fd is [%d]",fd);
> sys_write(fd,"Mail has develope sucesses , ",20) ;
> set_fs(old_fs) ;
> In another test program ,it is ok, no problem , but in the iptable hook function ,
> I found the get_fs(), get_ds() is the same address.
> In this case ,I should write some buffer into a file ,but i only know this way .
> ...., : ( , what can i do .
Why not write your application in userspace? It will be far easier to
write and debug. See
More information about the linux