599c1c817e
latter causes stack corruption (workaround #490515)
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
--- open-iscsi-2.0-870.1/libiscsi/libiscsi.c 2009-03-20 15:21:24.000000000 +0100
|
|
+++ new/libiscsi/libiscsi.c 2009-03-20 15:21:11.000000000 +0100
|
|
@@ -196,10 +196,10 @@
|
|
*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,8 +535,10 @@
|
|
|
|
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)) {
|
|
+ strcpy(context->error_str, "Could not read fw values.");
|
|
return ENODEV;
|
|
+ }
|
|
|
|
config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0;
|
|
strncpy(config->iface_name, fw_entry.iface, sizeof fw_entry.iface);
|
|
@@ -557,8 +559,10 @@
|
|
|
|
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)) {
|
|
+ strcpy(context->error_str, "Could not read fw values.");
|
|
return ENODEV;
|
|
+ }
|
|
|
|
strncpy(initiatorname, fw_entry.initiatorname,
|
|
sizeof fw_entry.initiatorname);
|