lkml.org 
[lkml]   [2008]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: New IOCTLs
Date
Louis Rilling <Louis.Rilling@kerlabs.com> wrote:
> On Thu, Sep 18, 2008 at 09:53:51AM +0530, Singaravelan Nallasellan wrote:

>> Thank you for your response.
>>
>> The driver needs to assign an id for each open and create a sysfs
>> entry based on that id and expose some properties.

> What about using configfs? A user could create an id using mkdir in the
> driver's configfs subsystem, and this would make the driver create the
> matching sysfs entry.
>
> # mkdir /sys/kernel/config/<driver_subsys>/2
> -> reserve id 2 for the caller, and create /sys/class/xxx/<drivername>/2
>
> You could even put whatever configuration items inside configfs instead of
> sysfs.

Sounds like simulating file descriptors, with more overhead and less
functionality, just for having non-atomic access to name->value pairs.

Besides that, we don't yet know the purpose of the IOCTL, and even less about
the driver. Maybe the user will need to read or write, too, or pass the fd
to other processes.



\
 
 \ /
  Last update: 2008-09-18 16:49    [W:0.022 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site