Re: procfs question

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

 



On Mon, Jun 19, 2006 at 04:54:57PM +0200, Fernando Apestegu?a wrote:
> On 6/19/06, Greg KH <greg@xxxxxxxxx> wrote:
> >Use debugfs instead.  It's much easier to do this there.  If you really
> >want to, sysfs can be used also, but it depends on what you want to
> >provide in those files.
> 
> 
> Each file will provide three numbers. So I wouldn't like to duplicate code.
> Just write a single read_proc function and then perform the switch to know
> which three values should I return.

Same thing works for either debugfs or sysfs.

> I know about the existence of sysfs but not about debugfs. I would
> prefer to use procfs for other reasons (legacy code, in fact).

No new procfs files should be added to the kernel, so if you write stuff
for this, it will not be accepted by anyone upstream.

> However, could you point me to a good tutorial about sysfs and
> debugfs?

Have you looked at the in-kernel documentation for debugfs?  It is quite
complete.  And there are loads of in-kernel examples for how to use
sysfs.

Good luck,

greg k-h

--
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