LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   want to read a file from kernel module (https://www.linuxquestions.org/questions/linux-kernel-70/want-to-read-a-file-from-kernel-module-479974/)

ksrinivas 09-03-2006 05:46 AM

want to read a file from kernel module
 
Hi,

I am novice to Linux. I have one requirement where the kernel module has to read one file (configuration data). The file system is mounted using NFS. So i have to read one file from one of the locations usin NFS & copy to local kernal buffer & process the data. Could you please help me out on this.
Thanks in advance.

Regards,
Srinivas

unSpawn 09-03-2006 08:01 AM

Hello there and welcome to LQ, hope you like it here.

I am novice to Linux.
...and to LQ. You posted your thread in the Linux User Groups (LUG) forum, which is wrong.


I have one requirement
If this is a homework assignment then please read the LQ Rules carefully: we are willing to answer detailed and specific questions but you should do your homework yourself.


where the kernel module has to read one file (configuration data).
You can't make the kernel (or LKM) "read" a file: that's not how it works. If that's in the design of what you do then your thinking is wrong and your design dangerous and flawed. Do not proceed down that path: read the LKML (Linux Kernel mailinglist)! If you want to interface use /proc sysctl or any existing API: look for instance at how userland binaries like Iptables interface with the Netfilter framework.

XavierP 09-03-2006 01:49 PM

Moved: This thread is more suitable in Linux-Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.

ksrinivas 09-11-2006 05:58 AM

want to read a file from kernel module
 
Thanks for the reply.
But i have one requirement in my project where i have to get the configuration data for a device from some location (usng NFS) and then write on to the Hardware device. This has to be handled by Kernel module. Could any body give me some suggestions on this??

Thanks in advance


All times are GMT -5. The time now is 05:38 AM.