Date: Fri, 7 Oct 2016 01:33:03 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> 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 Message-ID: <201610070133.u971X3N5074666@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610070133.u971X3N5074666>