2009-03-20 14:49:24 +00:00
|
|
|
diff -up open-iscsi-2.0-870.1/include/fw_context.h.workaround open-iscsi-2.0-870.1/include/fw_context.h
|
|
|
|
--- open-iscsi-2.0-870.1/include/fw_context.h.workaround 2009-03-20 15:47:16.000000000 +0100
|
|
|
|
+++ open-iscsi-2.0-870.1/include/fw_context.h 2009-03-20 15:48:03.000000000 +0100
|
|
|
|
@@ -51,5 +51,7 @@ struct boot_context {
|
|
|
|
|
|
|
|
extern int fw_get_entry(struct boot_context *context, const char *filepath);
|
|
|
|
extern void fw_print_entry(struct boot_context *context);
|
|
|
|
+extern int fwparam_ibft_sysfs(struct boot_context *context,
|
|
|
|
+ const char *filepath);
|
|
|
|
|
|
|
|
#endif /* FWPARAM_CONTEXT_H_ */
|
|
|
|
diff -up open-iscsi-2.0-870.1/libiscsi/libiscsi.c.workaround open-iscsi-2.0-870.1/libiscsi/libiscsi.c
|
|
|
|
--- open-iscsi-2.0-870.1/libiscsi/libiscsi.c.workaround 2009-03-20 15:45:28.000000000 +0100
|
|
|
|
+++ open-iscsi-2.0-870.1/libiscsi/libiscsi.c 2009-03-20 15:47:03.000000000 +0100
|
|
|
|
@@ -196,10 +196,10 @@ int libiscsi_discover_firmware(struct li
|
2009-03-20 14:24:54 +00:00
|
|
|
*found_nodes = NULL;
|
|
|
|
|
|
|
|
memset(&fw_entry, 0, sizeof fw_entry);
|
|
|
|
- rc = fw_get_entry(&fw_entry, NULL);
|
|
|
|
+ rc = fwparam_ibft_sysfs(&fw_entry, NULL);
|
|
|
|
if (rc) {
|
|
|
|
strcpy(context->error_str, "Could not read fw values.");
|
|
|
|
- return rc;
|
|
|
|
+ return ENODEV;
|
|
|
|
}
|
|
|
|
|
|
|
|
memset(&rec, 0, sizeof rec);
|
2009-03-20 14:49:24 +00:00
|
|
|
@@ -535,7 +535,7 @@ int libiscsi_get_firmware_network_config
|
2009-03-20 14:24:54 +00:00
|
|
|
|
|
|
|
memset(config, 0, sizeof *config);
|
|
|
|
memset(&fw_entry, 0, sizeof fw_entry);
|
|
|
|
- if (fw_get_entry(&fw_entry, NULL))
|
2009-03-20 14:49:24 +00:00
|
|
|
+ if (fwparam_ibft_sysfs(&fw_entry, NULL))
|
2009-03-20 14:24:54 +00:00
|
|
|
return ENODEV;
|
|
|
|
|
|
|
|
config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0;
|
2009-03-20 14:49:24 +00:00
|
|
|
@@ -557,7 +557,7 @@ int libiscsi_get_firmware_initiator_name
|
2009-03-20 14:24:54 +00:00
|
|
|
|
|
|
|
memset(initiatorname, 0, LIBISCSI_VALUE_MAXLEN);
|
|
|
|
memset(&fw_entry, 0, sizeof fw_entry);
|
|
|
|
- if (fw_get_entry(&fw_entry, NULL))
|
2009-03-20 14:49:24 +00:00
|
|
|
+ if (fwparam_ibft_sysfs(&fw_entry, NULL))
|
2009-03-20 14:24:54 +00:00
|
|
|
return ENODEV;
|
|
|
|
|
|
|
|
strncpy(initiatorname, fw_entry.initiatorname,
|