svn commit: r316137 - stable/11/sbin/camcontrol
Alexander Motin
mav at FreeBSD.org
Wed Mar 29 14:57:42 UTC 2017
Author: mav
Date: Wed Mar 29 14:57:41 2017
New Revision: 316137
URL: https://svnweb.freebsd.org/changeset/base/316137
Log:
MFC r315711: Fix printing bits above first eight.
Modified:
stable/11/sbin/camcontrol/camcontrol.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/11/sbin/camcontrol/camcontrol.c Wed Mar 29 14:46:26 2017 (r316136)
+++ stable/11/sbin/camcontrol/camcontrol.c Wed Mar 29 14:57:41 2017 (r316137)
@@ -5321,7 +5321,7 @@ static void
cpi_print(struct ccb_pathinq *cpi)
{
char adapter_str[1024];
- int i;
+ uint64_t i;
snprintf(adapter_str, sizeof(adapter_str),
"%s%d:", cpi->dev_name, cpi->unit_number);
@@ -5329,7 +5329,7 @@ cpi_print(struct ccb_pathinq *cpi)
fprintf(stdout, "%s SIM/HBA version: %d\n", adapter_str,
cpi->version_num);
- for (i = 1; i < 0xff; i = i << 1) {
+ for (i = 1; i < UINT8_MAX; i = i << 1) {
const char *str;
if ((i & cpi->hba_inquiry) == 0)
@@ -5369,7 +5369,7 @@ cpi_print(struct ccb_pathinq *cpi)
fprintf(stdout, "%s\n", str);
}
- for (i = 1; i < 0xff; i = i << 1) {
+ for (i = 1; i < UINT32_MAX; i = i << 1) {
const char *str;
if ((i & cpi->hba_misc) == 0)
@@ -5416,7 +5416,7 @@ cpi_print(struct ccb_pathinq *cpi)
fprintf(stdout, "%s\n", str);
}
- for (i = 1; i < 0xff; i = i << 1) {
+ for (i = 1; i < UINT16_MAX; i = i << 1) {
const char *str;
if ((i & cpi->target_sprt) == 0)
More information about the svn-src-stable
mailing list