Re: [RFC] subclasses in sysfs to solve world peace

Dmitry Torokhov
2005-09-16T22:55:43Z

On 9/16/05, Greg KH <gregkh@suse.de> wrote:
> On Fri, Sep 16, 2005 at 02:21:53AM -0500, Dmitry Torokhov wrote:
> > > >
> > > > No, like your first picture, except 'interfaces/mice' will be a directory,
> > > > not a symlink, since it does not have class_device parent. I should have
> > > > said "Otherwise it gets added into _its_ class directory".
> > >
> >
> > Ok, this is _very_ raw and I am creating double symlinks somehow, but still
> > it shows it can be done:
> >
> > [dtor@core ~]$ tree /sys/class/input/
> > /sys/class/input/
> > |-- devices
> > | |-- input0
>
> Close, just drop the "devices" subdir, and you have my proposal, I'm
> glad we agree :)
>

No, not entirely agree. I _want_ devices subdir to separate objects of
different [sub]classes. We don;'t mix SCSI class_devices with USB, why
messing it here?

> > `-- interfaces
> > |-- event0 -> ../../../class/input/devices/input0/event0
>
> I don't see why we need the interfaces subdir at all.
>

For the same reasons you have hwmon stuff - one shoudl not hunt
through maze of subdirectories and filter unwanted data to get list of
objects of given class.

--
Dmitry