Re: How to use /proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 5, 2012 at 11:07 PM, Surenkumar Nihalani <suren@xxxxxxxxxx> wrote:
> Hello Guys,
>
> I am CS student trying to write a kernel module as a part of my class
> assignment. I wanted to know, from within kernel, how do I read and write
> data to my proc file?
> I need to store state from last call of my function.

Hello,

Have you tried searching on the internet? :D [1].

Another approach is to see how an existing proc
entry is handled. Look for example at /proc/sched_debug [2].

thanks,
Daniel.

[1] http://www.ibm.com/developerworks/linux/library/l-proc/index.html
[2] http://lxr.linux.no/linux+v3.2.4/kernel/sched_debug.c#L393

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux