Re: /proc vs. /sys

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

 



On Tuesday 20 January 2004 19:40, Greg KH wrote:
> On Tue, Jan 20, 2004 at 07:29:00PM +0100, Frank.A.Uepping@t-online.de wrote:
> > Assume we have a kernel module which provides a virtual (i.e. there is no
> > real hardware involved) service. Informations about the consumers of the
> > service should be made public via sysfs (former procfs).
> > Where is the right place in the sysfs directory hierarchy for my
> > informations?
>
> What exactly are we talking about here?  Please give specifics.
>
> greg k-h

Ok, here is what I want to achieve.

I am working on a remote-CAPI implementation for Linux.
        https://sourceforge.net/projects/rcapi4linux/
Currently I am porting/rewriting to kernel-2.6.

The new (for kernel-2.6) remote-CAPI implementation should introduce a new 
service allowing other code/modules to register/drive a remote-CAPI 
controller. Basically, a remote-CAPI controller is a CAPI controller with 
additional capabilities suited to facilitate the implementation of various 
remote-CAPI solutions. A remote CAPI controller is a pure software device, no 
physical hardware is involved here!

In order to make various information (like the registered controllers, its 
state, its CAPI applications, etc) available to the user I have chosen to use 
the sysfs for this (when this is appropriate at all).
Here is a sample tree:

/sys/.../rcapi/
|-- ctr0
|   |-- manufacturer
|   |-- serial_number
|   |-- state
|   |-- debug
|   |-- appl0/
|   |    |--- state
|   |    |--- remote_id
|   |    |--- id
|   |-- appl1/
|   |    |--- state
|   |    |--- ...
|-- ctr1/
|   |-- manufacturer
...

My questions are:
Is the sysfs appropriate for this kind of usage?
Where is the right place for my tree in /sys?
What are the rough steps needed to implement this?

/FAU


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