From owner-svn-src-head@freebsd.org Tue Jun 6 02:03:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCD2CB9437A; Tue, 6 Jun 2017 02:03:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D5CD77B64; Tue, 6 Jun 2017 02:03:23 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5623Mnr031410; Tue, 6 Jun 2017 02:03:22 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5623M55031409; Tue, 6 Jun 2017 02:03:22 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201706060203.v5623M55031409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 6 Jun 2017 02:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319610 - head/usr.sbin/sesutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 02:03:23 -0000 Author: allanjude Date: Tue Jun 6 02:03:22 2017 New Revision: 319610 URL: https://svnweb.freebsd.org/changeset/base/319610 Log: 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 Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Mon Jun 5 20:18:55 2017 (r319609) +++ head/usr.sbin/sesutil/sesutil.c Tue Jun 6 02:03:22 2017 (r319610) @@ -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);