usr.sbin/sesutil: 'locate all off' does not deactivate empty slots

PR:		217409
Reported by:	asomers
Reviewed by:	asomers, bapt
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D10458
This commit is contained in:
allanjude 2017-06-06 02:03:22 +00:00
parent d0caf7be98
commit be2997cf94

View File

@ -252,6 +252,10 @@ sesled(int argc, char **argv, bool setfault)
break;
}
for (j = 0; j < nobj; j++) {
if (all) {
do_led(fd, objp[j].elm_idx, onoff, setfault);
continue;
}
memset(&objdn, 0, sizeof(objdn));
objdn.elm_idx = objp[j].elm_idx;
objdn.elm_names_size = 128;
@ -265,11 +269,6 @@ sesled(int argc, char **argv, bool setfault)
continue;
}
if (objdn.elm_names_len > 0) {
if (all) {
do_led(fd, objdn.elm_idx,
onoff, setfault);
continue;
}
if (disk_match(objdn.elm_devnames, disk, len)) {
do_led(fd, objdn.elm_idx,
onoff, setfault);