Date: Thu, 5 Nov 2015 07:48:48 +0000 (UTC) From: Garrett Cooper <ngie@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: r290385 - in stable/10: sbin/camcontrol share/misc Message-ID: <201511050748.tA57mm9q080061@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Thu Nov 5 07:48:48 2015 New Revision: 290385 URL: https://svnweb.freebsd.org/changeset/base/290385 Log: MFC r289913,r289916: r289913: Use 't' (bits) not 'i' (bytes) for describing MRIE (aka "Method of Reporting Informational Exceptions") in the SCSI mode database as the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is 4 bits wide, not 4 bytes wide 1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf Bug 200619 Reported by: Michael Baptist <mbaptist@isilon.com> Submitted by: Lars Skodje <lskodje@isilon.com> Sponsored by: EMC / Isilon Storage Division r289916: Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the mode value isn't always clipped to -1 when (resolution * size) == 32, which would have been the case with values => {4i,32b,32t}. This seems to have been broken in r64382. PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/camcontrol/modeedit.c stable/10/share/misc/scsi_modes Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/modeedit.c ============================================================================== --- stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:48:48 2015 (r290385) @@ -246,7 +246,7 @@ editentry_set(char *name, char *newvalue * currently workaround it (even for int64's), so we have to kludge it. */ #define RESOLUTION_MAX(size) ((resolution * (size) == 32)? \ - (int)0xffffffff: (1 << (resolution * (size))) - 1) + INT_MAX: (1 << (resolution * (size))) - 1) assert(newvalue != NULL); if (*newvalue == '\0') Modified: stable/10/share/misc/scsi_modes ============================================================================== --- stable/10/share/misc/scsi_modes Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/share/misc/scsi_modes Thu Nov 5 07:48:48 2015 (r290385) @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} b4 + {MRIE} t4 {Interval Timer} i4 {Report Count} i4 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511050748.tA57mm9q080061>