From patchwork Tue Dec 29 14:30:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 70104 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBTEXEUn025460 for ; Tue, 29 Dec 2009 14:33:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751007AbZL2OdO (ORCPT ); Tue, 29 Dec 2009 09:33:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751482AbZL2OdN (ORCPT ); Tue, 29 Dec 2009 09:33:13 -0500 Received: from qmta10.westchester.pa.mail.comcast.net ([76.96.62.17]:34492 "EHLO QMTA10.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbZL2OdN (ORCPT ); Tue, 29 Dec 2009 09:33:13 -0500 Received: from OMTA01.westchester.pa.mail.comcast.net ([76.96.62.11]) by QMTA10.westchester.pa.mail.comcast.net with comcast id P1651d0040EZKEL5A2ZDtN; Tue, 29 Dec 2009 14:33:13 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA01.westchester.pa.mail.comcast.net with comcast id P2ZC1d0080hNrtn3M2ZCDh; Tue, 29 Dec 2009 14:33:13 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id nBTEVDmj020493; Tue, 29 Dec 2009 09:31:18 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id nBTEUnr0020462; Tue, 29 Dec 2009 09:30:49 -0500 Date: Tue, 29 Dec 2009 09:30:49 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] infiniband-diags/ibqueryerrors.c: Fix output format of counters Message-ID: <20091229143049.GA20458@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/infiniband-diags/src/ibqueryerrors.c b/infiniband-diags/src/ibqueryerrors.c index 370c74d..47bd2af 100644 --- a/infiniband-diags/src/ibqueryerrors.c +++ b/infiniband-diags/src/ibqueryerrors.c @@ -226,7 +226,7 @@ static int print_xmitdisc_details(char *buf, size_t size, ib_portid_t * portid, i++) { mad_decode_field(pc, i, (void *)&val); if (val) - n += snprintf(buf + n, size - n, " [%s == %d]", + n += snprintf(buf + n, size - n, " [%s == %u]", mad_field_name(i), val); } return n; @@ -251,7 +251,7 @@ static void print_results(ib_portid_t * portid, char *node_name, mad_decode_field(pc, i, (void *)&val); if (val) - n += snprintf(str + n, 1024 - n, " [%s == %d]", + n += snprintf(str + n, 1024 - n, " [%s == %u]", mad_field_name(i), val); /* If there are PortXmitDiscards, get details (if supported) */ @@ -264,7 +264,7 @@ static void print_results(ib_portid_t * portid, char *node_name, if (!suppress(IB_PC_XMT_WAIT_F)) { mad_decode_field(pc, IB_PC_XMT_WAIT_F, (void *)&val); if (val) - n += snprintf(str + n, 1024 - n, " [%s == %d]", + n += snprintf(str + n, 1024 - n, " [%s == %u]", mad_field_name(IB_PC_XMT_WAIT_F), val); } @@ -276,7 +276,7 @@ static void print_results(ib_portid_t * portid, char *node_name, mad_decode_field(pc, i, (void *)&val64); if (val64) n += snprintf(str + n, 1024 - n, - " [%s == %" PRId64 "]", + " [%s == %" PRIu64 "]", mad_field_name(i), val64); }