LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-03-2006, 05:46 AM   #1
ksrinivas
LQ Newbie
 
Registered: Sep 2006
Posts: 15

Rep: Reputation: 0
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
 
Old 09-03-2006, 08:01 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
Old 09-03-2006, 01:49 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-11-2006, 05:58 AM   #4
ksrinivas
LQ Newbie
 
Registered: Sep 2006
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read file in kernel space aluser Programming 2 08-22-2006 09:28 AM
read routing table in kernel module? cranium2004 Programming 0 03-15-2005 07:15 AM
How to read from /proc entry in another kernel module? linux_lover2005 Programming 0 01-14-2005 05:44 AM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
How can I read regular file in kernel module jooboo Programming 5 12-30-2003 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration