mirror_zfs/cmd/zed
Christopher Voltz 100790a8dd Retry setting LED
If the LED is being accessed by another process when we try to update
it, the update will be lost. Add a retry loop which will read the state
of the LED and update it until the LED is in the correct state. The
number of times this will occur is limited to ensure that the ZEDlet
won't hang ZED.

Refactor to remove duplication so setting of the LED occurs in only one
place.

Cleanup a couple of the warnings generated by shellcheck which weren't
the result of specific choices by the author. Several notes and warnings
are still present but removing them would make the code less clear or
require adding lines to tell shellcheck to ignore the warning.

Remove ",i" from the documentation at the top of the file which appears
to be a typographic error.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Christopher Voltz <christopher.voltz@hpe.com>
Closes #5795
2017-02-16 13:41:48 -08:00
..
agents Fix spelling 2017-01-03 11:31:18 -06:00
zed.d Retry setting LED 2017-02-16 13:41:48 -08:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Enclosure LED fixes 2017-02-10 16:09:45 -08:00
zed_conf.c Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed_conf.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_disk_event.c Fix spelling 2017-01-03 11:31:18 -06:00
zed_disk_event.h Bring over illumos ZFS FMA logic -- phase 1 2016-09-01 11:39:45 -07:00
zed_event.c Fix coverity defects: CID 147587 2016-12-21 11:27:24 -08:00
zed_event.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_exec.c Fix spelling 2017-01-03 11:31:18 -06:00
zed_exec.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_file.c Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_file.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_log.c Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed_log.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
zed_strings.c Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed_strings.h Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed.c Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
zed.h Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00