lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YQOMiO1HAf60Odqa@kroah.com>
Date:   Fri, 30 Jul 2021 07:22:16 +0200
From:   Greg KH <greg@...ah.com>
To:     Ian Pilcher <arequipeno@...il.com>
Cc:     Valdis Klētnieks <valdis.kletnieks@...edu>,
        axboe@...nel.dk, kernelnewbies@...nelnewbies.org,
        linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        pavel@....cz, linux-leds@...r.kernel.org
Subject: Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

On Thu, Jul 29, 2021 at 10:52:06AM -0500, Ian Pilcher wrote:
> 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.

Add a name to your attribute group and sysfs creates the subdirectory
automagically for you.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ