freebsd-dev/usr.sbin/sesutil
Alexander Motin fe74eaab7c Check element type before setting LEDs.
With r319610, sesutil started twiddling the bits of every SES device.
Not everything is a disk slot, there are also fan controllers, temperature
sensors, even power supplies, among other things controlled by SES.

Add a type check to make sure we are only operating on device slot and array
device slot elements.  Other type elements will be skipped, but it would be
simple to add additional cases for controlling the ident LEDs of other
element types (which are not necessarily the same bits).

Rather than doing raw bit manipulation of an unstructured byte array using
unnamed numeric constants, leverage existing code abstractions.

Submitted by:	Ryan Moeller <ryan@freqlabs.com>
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D19052
2019-02-04 01:24:10 +00:00
..
eltsub.c Add libxo(3) support to sesutil(8) 2017-06-29 18:52:36 +00:00
eltsub.h Directly print the extra status instead of filling a buffer 2017-06-23 15:09:08 +00:00
Makefile Add libxo(3) support to sesutil(8) 2017-06-29 18:52:36 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sesutil.8 Add libxo(3) support to sesutil(8) 2017-06-29 18:52:36 +00:00
sesutil.c Check element type before setting LEDs. 2019-02-04 01:24:10 +00:00