iscsi-initiator-utils/open-iscsi-2.0-870.1-490515-workaround.patch

46 lines
1.8 KiB
Diff
Raw Normal View History

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
*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);
@@ -535,7 +535,7 @@ int libiscsi_get_firmware_network_config
memset(config, 0, sizeof *config);
memset(&fw_entry, 0, sizeof fw_entry);
- if (fw_get_entry(&fw_entry, NULL))
+ if (fwparam_ibft_sysfs(&fw_entry, NULL))
return ENODEV;
config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0;
@@ -557,7 +557,7 @@ int libiscsi_get_firmware_initiator_name
memset(initiatorname, 0, LIBISCSI_VALUE_MAXLEN);
memset(&fw_entry, 0, sizeof fw_entry);
- if (fw_get_entry(&fw_entry, NULL))
+ if (fwparam_ibft_sysfs(&fw_entry, NULL))
return ENODEV;
strncpy(initiatorname, fw_entry.initiatorname,