From patchwork Thu Jun 16 18:10:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 888232 X-Patchwork-Delegate: ira.weiny@intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5GI3K5i028146 for ; Thu, 16 Jun 2011 18:03:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932155Ab1FPSD0 (ORCPT ); Thu, 16 Jun 2011 14:03:26 -0400 Received: from nspiron-1.llnl.gov ([128.115.41.81]:57813 "EHLO nspiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758559Ab1FPSDZ (ORCPT ); Thu, 16 Jun 2011 14:03:25 -0400 X-Attachments: None Received: from eris.llnl.gov (HELO trebuchet.chaos) ([134.9.2.84]) by nspiron-1.llnl.gov with SMTP; 16 Jun 2011 11:03:25 -0700 Date: Thu, 16 Jun 2011 11:10:24 -0700 From: Ira Weiny To: "linux-rdma@vger.kernel.org" Subject: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function Message-Id: <20110616111024.fde795bc.weiny2@llnl.gov> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.10.4; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 16 Jun 2011 18:03:27 +0000 (UTC) From: Ira Weiny Date: Thu, 2 Jun 2011 00:17:21 -0700 Subject: [PATCH] infiniband-diags: saquery; reuse dump_one_mcmember_record function Signed-off-by: Ira Weiny --- src/saquery.c | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/saquery.c b/src/saquery.c index 7933fec..e1ab7dd 100644 --- a/src/saquery.c +++ b/src/saquery.c @@ -486,7 +486,6 @@ static void dump_multicast_group_record(void *data) static void dump_multicast_member_record(void *data) { char gid_str[INET6_ADDRSTRLEN]; - char gid_str2[INET6_ADDRSTRLEN]; ib_member_rec_t *p_mcmr = data; uint16_t mlid = cl_ntoh16(p_mcmr->mlid); unsigned i = 0; @@ -512,19 +511,8 @@ static void dump_multicast_member_record(void *data) inet_ntop(AF_INET6, p_mcmr->port_gid.raw, gid_str, sizeof gid_str), node_name); } else { - printf("MCMemberRecord member dump:\n" - "\t\tMGID....................%s\n" - "\t\tMlid....................0x%X\n" - "\t\tPortGid.................%s\n" - "\t\tScopeState..............0x%X\n" - "\t\tProxyJoin...............0x%X\n" - "\t\tNodeDescription.........%s\n", - inet_ntop(AF_INET6, p_mcmr->mgid.raw, gid_str, - sizeof gid_str), - cl_ntoh16(p_mcmr->mlid), - inet_ntop(AF_INET6, p_mcmr->port_gid.raw, - gid_str2, sizeof gid_str2), - p_mcmr->scope_state, p_mcmr->proxy_join, node_name); + dump_one_mcmember_record(data); + printf("\t\tNodeDescription.........%s\n", node_name); } }