Hello, I want to read file in kernel module. can anybody help me by giving code for that? Also whats suitable way to do that in kernel /proc or shared memory? what i want is to read and write a user file frequently. regards, linux_lover
reply-----------------------------------------------
Hi linux lover . Reading or wriring a file from kernel is possible . But its not recomended . Its better to communicate with the kernel module using Copyto_User() function or write to a /proc buffer . Still if you want to access
the file from the kernel . The only possible way is to access the file is to use the underlying functions to open , read & write . I dont exactly remembre the function names . But everything starts with file_XXX . Search for that in www.
regards, shyam
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/