summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-11-05 07:48:48 +0000
committerngie <ngie@FreeBSD.org>2015-11-05 07:48:48 +0000
commit8c5f7fac71237f23d1f940198a3a977da08b853a (patch)
tree030e8fcac031499c74ed5aaa3ff47f7c52e5f125 /sbin
parent375651c350e33dac78ce6464772181ba87277ba3 (diff)
downloadFreeBSD-src-8c5f7fac71237f23d1f940198a3a977da08b853a.zip
FreeBSD-src-8c5f7fac71237f23d1f940198a3a977da08b853a.tar.gz
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
Diffstat (limited to 'sbin')
-rw-r--r--sbin/camcontrol/modeedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c
index 00ab974..8262c3c 100644
--- a/sbin/camcontrol/modeedit.c
+++ b/sbin/camcontrol/modeedit.c
@@ -246,7 +246,7 @@ editentry_set(char *name, char *newvalue, int editonly)
* 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')
OpenPOWER on IntegriCloud