[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee56510e-e8ef-5e92-3e29-4e290bfad9b2@gmail.com>
Date: Thu, 29 Jul 2021 10:52:06 -0500
From: Ian Pilcher <arequipeno@...il.com>
To: Valdis Klētnieks <valdis.kletnieks@...edu>
Cc: linux-block@...r.kernel.org, linux-leds@...r.kernel.org,
axboe@...nel.dk, pavel@....cz, linux-kernel@...r.kernel.org,
kernelnewbies@...nelnewbies.org
Subject: Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation
On 7/28/21 10:09 PM, Valdis Klētnieks wrote:
>> + # cat /sys/class/block/led_trigger_list
>> + baz: 0
>> + bar: 0
>> + foo: 0
>
> This looks like an abuse of the "one entry one value" rule for sysfs.
> Perhaps this should be a directory /sys/class/block/defined_triggers/
> and separate files under that for foo, bar, and baz? That would probably
> make reference counting a lot easier as well....
Indeed it is.
Funny that you should mention using a subdirectory. I originally wanted
to put all of the trigger-related stuff into
/sys/class/block/led_triggers/, but I couldn't find any API to create a
subdirectory for *class* attributes (only for device attributes), nor do
I see any such subdirectories on my system.
# find /sys/class -type d | egrep '^/sys/class/[^/]+/'
(no output)
Is is possible to create subdirectories for class attributes?
--
========================================================================
In Soviet Russia, Google searches you!
========================================================================
Powered by blists - more mailing lists