From owner-svn-src-stable@freebsd.org Fri Oct 7 01:33:04 2016 Return-Path: Delivered-To: svn-src-stable@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 72D8FBECE68; Fri, 7 Oct 2016 01:33:04 +0000 (UTC) (envelope-from mav@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 41F05889; Fri, 7 Oct 2016 01:33:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u971X3tL074667; Fri, 7 Oct 2016 01:33:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u971X3N5074666; Fri, 7 Oct 2016 01:33:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610070133.u971X3N5074666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 7 Oct 2016 01:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r306797 - stable/10/usr.sbin/sesutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 01:33:04 -0000 Author: mav Date: Fri Oct 7 01:33:03 2016 New Revision: 306797 URL: https://svnweb.freebsd.org/changeset/base/306797 Log: MFC r306528: Fix `sesutil fault` operation. Fault and ident bits are located in different control bytes, so previous code was just doing nothing, writing into reserved bit. Modified: stable/10/usr.sbin/sesutil/sesutil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sesutil/sesutil.c ============================================================================== --- stable/10/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:32:29 2016 (r306796) +++ stable/10/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:33:03 2016 (r306797) @@ -119,10 +119,16 @@ do_led(int fd, unsigned int idx, bool on err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) { - o.cstat[2] |= (setfault ? 0x20 : 0x02); + if (setfault) { + if (onoff) + o.cstat[3] |= 0x20; + else + o.cstat[3] &= 0xdf; } else { - o.cstat[2] &= (setfault ? 0xdf : 0xfd); + if (onoff) + o.cstat[2] |= 0x02; + else + o.cstat[2] &= 0xfd; } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) {