aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJohn Soni Jose <sony.john-n@emulex.com>2012-08-20 13:30:31 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 12:59:27 -0400
commitdf5d0e6ee9d68f874959fa028388efa26f495f63 (patch)
treef7a0b523c761588c797ad6629ee2440bb8feeeb0 /drivers/scsi/be2iscsi
parent99bc5d55c06cbf9ac2d8ab7fb8348c4abce5fbaf (diff)
[SCSI] be2iscsi: Format the MAC_ADDR with sysfs_format_mac.
The MAC_ADDR stored in driver private structure is of unsigned char data type but strlcpy parameters is of signed char data type. This conversion of data types lead to change in the value.This changed value is passed to the upper layer and junk characters were displayed when "iscsiadm -m iface" command was run. In case of iSCSI boot, since the the MAC_ADDR was coming junk the boot was also not working Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 41b1fb70dd3b..8efdd8e2d989 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -792,7 +792,7 @@ int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba)
792 int rc; 792 int rc;
793 793
794 if (strlen(phba->mac_address)) 794 if (strlen(phba->mac_address))
795 return strlcpy(buf, phba->mac_address, PAGE_SIZE); 795 return sysfs_format_mac(buf, phba->mac_address, ETH_ALEN);
796 796
797 memset(&resp, 0, sizeof(resp)); 797 memset(&resp, 0, sizeof(resp));
798 rc = mgmt_get_nic_conf(phba, &resp); 798 rc = mgmt_get_nic_conf(phba, &resp);