diff options
author | Nilesh Javali <nilesh.javali@cavium.com> | 2018-04-20 02:39:48 -0400 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2018-04-23 10:45:27 -0700 |
commit | 473beb10a047769ac13aba69012575994c4270be (patch) | |
tree | ac0bbf6cffb8d424256e3d5d4d90d8d3065d9da6 | |
parent | 75f4231354f7e3ac4fcd80f52b69758e808f79a2 (diff) | |
download | open-iscsi-473beb10a047769ac13aba69012575994c4270be.tar.gz |
iscsiadm: get transport_name correctly for offload iface
The qedi offload iface does not have netdev associated with it.
Correctly get the transport_name from boot context.
iBFT and offload iface can rely on this method to get the
transport name.
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
-rw-r--r-- | utils/fwparam_ibft/fw_entry.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/fwparam_ibft/fw_entry.c b/utils/fwparam_ibft/fw_entry.c index b49e53f..96af145 100644 --- a/utils/fwparam_ibft/fw_entry.c +++ b/utils/fwparam_ibft/fw_entry.c @@ -161,7 +161,11 @@ void fw_free_targets(struct list_head *list) static void dump_initiator(struct boot_context *context) { - char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; + struct iface_rec iface; + + memset(&iface, 0, sizeof(iface)); + iface_setup_defaults(&iface); + iface_setup_from_boot_context(&iface, context); if (strlen(context->initiatorname)) printf("%s = %s\n", IFACE_INAME, context->initiatorname); @@ -169,9 +173,7 @@ static void dump_initiator(struct boot_context *context) if (strlen(context->isid)) printf("%s = %s\n", IFACE_ISID, context->isid); - memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN); - if (!net_get_transport_name_from_netdev(context->iface, transport_name)) - printf("%s = %s\n", IFACE_TRANSPORTNAME, transport_name); + printf("%s = %s\n", IFACE_TRANSPORTNAME, iface.transport_name); } static void dump_target(struct boot_context *context) |