|
|
786c6d |
From 0a95bc409c6282b95c48ba39a16e17c3e6e26537 Mon Sep 17 00:00:00 2001
|
|
|
786c6d |
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
|
|
|
786c6d |
Date: Fri, 18 Oct 2013 09:29:17 -0400
|
|
|
786c6d |
Subject: [PATCH] iscsi tools: Setup iface conf file with all iface attrs
|
|
|
786c6d |
exported in sysfs
|
|
|
786c6d |
|
|
|
786c6d |
Currently, iface conf file does not get populated with all the iface
|
|
|
786c6d |
attrs that are exported in corresponding sysfs entry.
|
|
|
786c6d |
This patch allows to setup conf file with all iface attrs in sysfs.
|
|
|
786c6d |
|
|
|
786c6d |
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
|
|
|
786c6d |
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
|
|
|
786c6d |
---
|
|
|
786c6d |
usr/iface.c | 8 ++++----
|
|
|
786c6d |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
786c6d |
|
|
|
786c6d |
diff --git a/usr/iface.c b/usr/iface.c
|
|
|
786c6d |
index c86892e..8580d1a 100644
|
|
|
786c6d |
--- a/usr/iface.c
|
|
|
786c6d |
+++ b/usr/iface.c
|
|
|
786c6d |
@@ -476,11 +476,8 @@ static int iface_setup_binding_from_kern_iface(void *data,
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
memset(&iface, 0, sizeof(struct iface_rec));
|
|
|
786c6d |
- strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
|
|
786c6d |
- strcpy(iface.transport_name, hinfo->iface.transport_name);
|
|
|
786c6d |
-
|
|
|
786c6d |
if (kern_iface) {
|
|
|
786c6d |
- iface.iface_num = kern_iface->iface_num;
|
|
|
786c6d |
+ memcpy(&iface, kern_iface, sizeof(iface));
|
|
|
786c6d |
|
|
|
786c6d |
snprintf(iface.name, sizeof(iface.name), "%s.%s.%s.%u",
|
|
|
786c6d |
kern_iface->transport_name,
|
|
|
786c6d |
@@ -492,6 +489,9 @@ static int iface_setup_binding_from_kern_iface(void *data,
|
|
|
786c6d |
hinfo->iface.transport_name, hinfo->iface.hwaddress);
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
+ strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
|
|
786c6d |
+ strcpy(iface.transport_name, hinfo->iface.transport_name);
|
|
|
786c6d |
+
|
|
|
786c6d |
memset(iface_path, 0, sizeof(iface_path));
|
|
|
786c6d |
snprintf(iface_path, PATH_MAX, "%s/%s", IFACE_CONFIG_DIR,
|
|
|
786c6d |
iface.name);
|
|
|
786c6d |
--
|
|
|
786c6d |
1.8.3.1
|
|
|
786c6d |
|