[RFC PATCH 1/8] docs: Add block device LED trigger documentation

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Wed Jul 28 23:09:15 EDT 2021


On Wed, 28 Jul 2021 20:53:37 -0500, Ian Pilcher said:

> +Create a new block device LED trigger::
> +
> +	# echo foo > /sys/class/block/led_trigger_new
> +
> +The name must be unique among all LED triggers (not just block device LED
> +triggers).
> +
> +Create two more::
> +
> +	# echo bar baz > /sys/class/block/led_trigger_new

> +	# 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....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20210728/4f7601c0/attachment-0001.sig>


More information about the Kernelnewbies mailing list