public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] infiniband-diags/src/ibqueryerrors.c: fix segv due to CA port 0 reference
@ 2011-09-27 22:52 Marcus R Epperson
       [not found] ` <1317163951-25948-1-git-send-email-marcus.r.epperson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Marcus R Epperson @ 2011-09-27 22:52 UTC (permalink / raw)
  To: Ira Weiny; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Marcus R Epperson


Signed-off-by: Marcus R Epperson <marcus.r.epperson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 src/ibqueryerrors.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
index fa116a9..230f6b2 100644
--- a/src/ibqueryerrors.c
+++ b/src/ibqueryerrors.c
@@ -427,8 +427,9 @@ static int print_results(ib_portid_t * portid, char *node_name,
 		}
 
 		if (portnum == 0xFF)
-			printf("   GUID 0x%" PRIx64 " port ALL:%s\n",
-			       node->ports[0]->guid, str);
+			if (node->type == IB_NODE_SWITCH)
+				printf("   GUID 0x%" PRIx64 " port ALL:%s\n",
+				       node->ports[0]->guid, str);
 		else
 			printf("   GUID 0x%" PRIx64 " port %d:%s\n",
 			       node->ports[portnum]->guid, portnum, str);
-- 
1.7.4.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] 5+ messages in thread

end of thread, other threads:[~2011-09-29 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 22:52 [PATCH 1/2] infiniband-diags/src/ibqueryerrors.c: fix segv due to CA port 0 reference Marcus R Epperson
     [not found] ` <1317163951-25948-1-git-send-email-marcus.r.epperson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-09-27 22:52   ` [PATCH 2/2] infiniband-diags/src/ibqueryerrors.c: don't increment bad_ports for port ALL Marcus R Epperson
2011-09-28  0:29   ` [PATCH 1/2] infiniband-diags/src/ibqueryerrors.c: fix segv due to CA port 0 reference Ira Weiny
     [not found]     ` <20110927172920.ad114c31.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-09-28  0:50       ` Marcus Epperson
     [not found]         ` <CAJ4ALkje120ds7V7i=HMp4Qy_7KcDCpqEYVmfBmunsDy9cinRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-29 19:47           ` Ira Weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox