* [PATCH] infiniband-diags: iblinkinfo flag ports which were not scanned
@ 2011-10-26 21:27 Ira Weiny
0 siblings, 0 replies; only message in thread
From: Ira Weiny @ 2011-10-26 21:27 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
When using the -n option iblinkinfo may not scan the entire fabric. As such
some ports will not be available to print. Output that information rather than
blank data as before.
Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
---
src/iblinkinfo.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/iblinkinfo.c b/src/iblinkinfo.c
index 4b69a5c..00c7bc0 100644
--- a/src/iblinkinfo.c
+++ b/src/iblinkinfo.c
@@ -214,8 +214,12 @@ void print_port(ibnd_node_t * node, ibnd_port_t * port, char *out_prefix)
port->remoteport->portnum, ext_port_str, remap,
width_msg, speed_msg);
free(remap);
- } else
- snprintf(remote_str, 256, " [ ] \"\" ( )\n");
+ } else {
+ if (istate == IB_LINK_DOWN)
+ snprintf(remote_str, 256, " [ ] \"\" ( )\n");
+ else
+ snprintf(remote_str, 256, " \"Port not available\"\n");
+ }
if (port->ext_portnum)
snprintf(ext_port_str, 256, "%d", port->ext_portnum);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-26 21:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 21:27 [PATCH] infiniband-diags: iblinkinfo flag ports which were not scanned Ira Weiny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox