Results 1 to 2 of 2
hey guys,
i am trying to implement a module that reads from
proc/meminfo
proc/cpuinfo
and writes it in another file in proc
i also need the current process list written ...
- 07-28-2006 #1Just Joined!
- Join Date
- Jul 2006
- Posts
- 1
History Kernel Module
hey guys,
i am trying to implement a module that reads from
proc/meminfo
proc/cpuinfo
and writes it in another file in proc
i also need the current process list written in the same file, yet i couldnt go that far for now.
can i use straight good old fprintf() in classical manner? or is there a more systematic way to do it?
if you think fprintf() would satisfy, what may be the parameters?
- 07-30-2006 #2Bad idea. The linux kernel doesn't read files. That's a user space task. In fact that are not common files but pseudo-files. Please, read these articles:
Originally Posted by Timwe
http://www.linuxforums.org/misc/unde...ing_/proc.html
http://www.linuxforums.org/misc/unde...c:_part_2.html
http://www.linuxforums.org/misc/proc...he_inside.html
You can not use libc libraries from inside the kernel at all . Read some books about kernel programming. You can start for these articles:
Originally Posted by Timwe
http://www.linuxforums.org/programmi...ng_part_i.html
http://www.linuxforums.org/programmi...g_part_ii.html
Regards


Reply With Quote
