Re: Re: how to read a file and write a file located in /proc

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

 



  

i want to know can i use char device in kernel to store and read information?
what i know only that char device will be used char by char?
On Wed, 21 Apr 2004 William J. Beksi wrote :
>bunty wrote:
>
> >
> >
> > hello,
> > i study the kernel source code to find out how kernel writes to /proc
> > file system but unable to trace and only fine out that it writes via
> > sprintf. IS there any function that allow me to read and write to file.
> > regards,
> >
> >
> >
>You can implement your own read and write functions using the following
>params:
>int write_func(struct file* file, const char* buffer, unsigned long
>count, void* data);
>
>int read_func(char* page, char** start, off_t off, int count, int* eof,
>void* data);
>
>For your reference:
>http://www.kernelnewbies.org/documents/kdoc/procfs-guide/lkprocfsguide.html
>http://www.gelato.unsw.edu.au/~dsw/public-files/kernel-docs/kernel-api/index.html
>
>
>-Bill
>
>
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive:       http://mail.nl.linux.org/kernelnewbies/
>FAQ:           http://kernelnewbies.org/faq/
>

[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