diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-01-15 06:28:07 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-01-16 00:17:18 -0500 |
commit | 3c9786e59515ed18153bfa4a36e0a2e762c0dc68 (patch) | |
tree | 851472e8f3b0f05337f59b91879f953472bdd5e9 /drivers/scsi | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
tcm_qla2xxx: print port name via %*phC
Instead of pushing each byte via stack let's use custom specifier which allows
to print small buffers as a hex string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 73f9feecda72..99f43b7fc9ab 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -1570,9 +1570,7 @@ static int tcm_qla2xxx_check_initiator_node_acl( | |||
1570 | * match the format by tcm_qla2xxx explict ConfigFS NodeACLs. | 1570 | * match the format by tcm_qla2xxx explict ConfigFS NodeACLs. |
1571 | */ | 1571 | */ |
1572 | memset(&port_name, 0, 36); | 1572 | memset(&port_name, 0, 36); |
1573 | snprintf(port_name, 36, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", | 1573 | snprintf(port_name, sizeof(port_name), "%8phC", fc_wwpn); |
1574 | fc_wwpn[0], fc_wwpn[1], fc_wwpn[2], fc_wwpn[3], fc_wwpn[4], | ||
1575 | fc_wwpn[5], fc_wwpn[6], fc_wwpn[7]); | ||
1576 | /* | 1574 | /* |
1577 | * Locate our struct se_node_acl either from an explict NodeACL created | 1575 | * Locate our struct se_node_acl either from an explict NodeACL created |
1578 | * via ConfigFS, or via running in TPG demo mode. | 1576 | * via ConfigFS, or via running in TPG demo mode. |