Re: [PATCH 2/2] RFC: iscsi ibft: convert iscsi_ibft module to iscsi boot lib

Previous thread: [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc. by Masami Hiramatsu on Monday, April 12, 2010 - 10:16 am. (30 messages)

Next thread: [PATCH 1/2] RFC: iscsi ibft: separate ibft parsing from sysfs interface by michaelc on Monday, April 12, 2010 - 11:06 am. (4 messages)
From: michaelc
Date: Monday, April 12, 2010 - 11:06 am

From: Mike Christie <michaelc@cs.wisc.edu>

This patch just converts the iscsi_ibft module to the
iscsi boot sysfs lib module.

This patch was made over the ibft-2.6 tree's ibft-1.03 branch:
http://git.kernel.org/?p=linux/kernel/git/konrad/ibft-2.6.git;a=shortlog;h=refs/heads/...

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 drivers/firmware/Kconfig      |    1 +
 drivers/firmware/iscsi_ibft.c |  698 +++++++++++++++--------------------------
 2 files changed, 248 insertions(+), 451 deletions(-)

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 571d218..a6c670b 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -132,6 +132,7 @@ config ISCSI_BOOT_SYSFS
 
 config ISCSI_IBFT
 	tristate "iSCSI Boot Firmware Table Attributes module"
+	select ISCSI_BOOT_SYSFS
 	depends on ISCSI_IBFT_FIND
 	default	n
 	help
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index b3ab24f..6d262be 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -82,6 +82,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/acpi.h>
+#include <linux/iscsi_boot_sysfs.h>
 
 #define IBFT_ISCSI_VERSION "0.5.0"
 #define IBFT_ISCSI_DATE "2010-Feb-25"
@@ -170,74 +171,6 @@ enum ibft_id {
 };
 
 /*
- * We do not support the other types, hence the usage of NULL.
- * This maps to the enum ibft_id.
- */
-static const char *ibft_id_names[] =
-	{NULL, NULL, "initiator", "ethernet%d", "target%d", NULL, NULL};
-
-/*
- * The text attributes names for each of the kobjects.
-*/
-enum ibft_eth_properties_enum {
-	ibft_eth_index,
-	ibft_eth_flags,
-	ibft_eth_ip_addr,
-	ibft_eth_subnet_mask,
-	ibft_eth_origin,
-	ibft_eth_gateway,
-	ibft_eth_primary_dns,
-	ibft_eth_secondary_dns,
-	ibft_eth_dhcp,
-	ibft_eth_vlan,
-	ibft_eth_mac,
-	/* ibft_eth_pci_bdf - this is replaced by link to the device itself. */
-	ibft_eth_hostname,
-	ibft_eth_end_marker,
-};
-
-static const char ...
From: Konrad Rzeszutek Wilk
Date: Monday, April 12, 2010 - 7:21 pm

I've only two comments:



and this one as well?
--

From: Mike Christie
Date: Monday, April 12, 2010 - 7:32 pm

I did not. They should be S_IRUGO. Do you want me to resubmit the 
patches or are you just going to edit those two lines if you merge them?
--

From: Konrad Rzeszutek Wilk
Date: Monday, April 12, 2010 - 7:36 pm

No need to resend them (unless Peter eyes found something I missed).
--

Previous thread: [PATCH -tip v3 00/10] perf-probe updates - data-structure support improvements, etc. by Masami Hiramatsu on Monday, April 12, 2010 - 10:16 am. (30 messages)

Next thread: [PATCH 1/2] RFC: iscsi ibft: separate ibft parsing from sysfs interface by michaelc on Monday, April 12, 2010 - 11:06 am. (4 messages)