Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-11-2008, 01:25 AM   #1
LQ Newbie
Registered: Sep 2008
Location: Bangalore, India
Posts: 3

Rep: Reputation: 0
command to write into proc entry

In Linux 2.6.18 kernel i am writing a kernel module which create a proc entry named tasklist by using create_proc_entry. In that tasklist file i want to write some structure variables. which command i should use in this module. becuase "write" will not work in kernel module.
Old 09-11-2008, 08:03 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
If I understand it correctly, /proc is a set of virtual files allowing you to see data structures in RAM. Is "create_proc_entry" a library function? If so, I am guessing that--once the structure is declared--simply assigning a value to a member of the struct will cause it to appear in /proc.

Some experiments should show you how it works.


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
maximum size of entry in /proc linuxdoniv Programming 3 04-01-2008 03:41 PM
writing a structure to the a entry in /proc linuxdoniv Programming 2 03-20-2008 07:05 AM
Strange entry in `df` (df: `/var/named/chroot/proc': Permission denied) BWebb Linux - General 1 09-14-2006 10:08 AM
How to read from /proc entry in another kernel module? linux_lover2005 Programming 0 01-14-2005 05:44 AM
Anybody know how to write to proc??? greek Linux - Hardware 2 08-15-2004 01:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:13 PM.

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