Razvan DEACONESCU wrote on 04/21/2005 03:40:27 PM: > Hi, > > i don't know very much about this, but i have recently developed a kernel > module that opens, reads, writes, closes files and i didn't use kernel > structures; i used system calls, and i think that might be the answer to > your question. > > what i did was this: i created a kernel thread so that i could work with > the process' file descriptor; i called set_fs (KERNEL_DS) - this way i > could get the system call (read, write, open, lseek, close) parameters > from kernel space; after that everything is like in user space: > fd = open (filename, O_RDWR); > and so on; > unlink should work the same way, i guess (not sure though - so don't hate > if it doesn't ;-) ) > > i don't know if this is of any help (i mean you have to have a kernel > thread), but you might give it a shot. > > happy hacking, > Razvan Thank you for the suggestion! I would like to avoid creating a thread, but at least this gives my another option. -Tony -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/