Blob Blame Raw
From 65ce3a27da47cecf71015b16b1d186c49cbb7bcc Mon Sep 17 00:00:00 2001
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Date: Tue, 17 Sep 2013 08:07:33 -0400
Subject: [PATCH] iscsi tools: Correctly get username_in and password_in
 flashnode params

Fix to correctly read username_in and password_in sysfs params for
flashnode session.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 usr/iscsi_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index 56cb90c..04c3673 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
@@ -601,12 +601,12 @@ int iscsi_sysfs_get_flashnode_info(struct flashnode_rec *fnode,
 	sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "username",
 		      (fnode->sess).username, sizeof((fnode->sess).username));
 	sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "username_in",
-		      (fnode->sess).username,
+		      (fnode->sess).username_in,
 		      sizeof((fnode->sess).username_in));
 	sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "password",
 		      (fnode->sess).password, sizeof((fnode->sess).password));
 	sysfs_get_str(sess_id, ISCSI_FLASHNODE_SUBSYS, "password_in",
-		      (fnode->sess).password,
+		      (fnode->sess).password_in,
 		      sizeof((fnode->sess).password_in));
 	sysfs_get_uint(conn_id, ISCSI_FLASHNODE_SUBSYS, "statsn",
 		       &((fnode->conn[0]).stat_sn));
-- 
1.8.3.1