svn commit: r306796 - stable/11/usr.sbin/sesutil
Alexander Motin
mav at FreeBSD.org
Fri Oct 7 01:32:31 UTC 2016
Author: mav
Date: Fri Oct 7 01:32:29 2016
New Revision: 306796
URL: https://svnweb.freebsd.org/changeset/base/306796
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/11/usr.sbin/sesutil/sesutil.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.sbin/sesutil/sesutil.c
==============================================================================
--- stable/11/usr.sbin/sesutil/sesutil.c Fri Oct 7 00:36:18 2016 (r306795)
+++ stable/11/usr.sbin/sesutil/sesutil.c Fri Oct 7 01:32:29 2016 (r306796)
@@ -118,10 +118,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) {
More information about the svn-src-stable
mailing list