Re: New IOCTLs

From: Bodo Eggert
Date: Thu Sep 18 2008 - 10:46:10 EST


Louis Rilling <Louis.Rilling@xxxxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/