Commit 3c9786e5 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Nicholas Bellinger

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 97bf6af1
...@@ -1570,9 +1570,7 @@ static int tcm_qla2xxx_check_initiator_node_acl( ...@@ -1570,9 +1570,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
* match the format by tcm_qla2xxx explict ConfigFS NodeACLs. * match the format by tcm_qla2xxx explict ConfigFS NodeACLs.
*/ */
memset(&port_name, 0, 36); memset(&port_name, 0, 36);
snprintf(port_name, 36, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", snprintf(port_name, sizeof(port_name), "%8phC", fc_wwpn);
fc_wwpn[0], fc_wwpn[1], fc_wwpn[2], fc_wwpn[3], fc_wwpn[4],
fc_wwpn[5], fc_wwpn[6], fc_wwpn[7]);
/* /*
* Locate our struct se_node_acl either from an explict NodeACL created * Locate our struct se_node_acl either from an explict NodeACL created
* via ConfigFS, or via running in TPG demo mode. * via ConfigFS, or via running in TPG demo mode.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment