From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Irena Kruchkovsky <irena-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Cc: Linux RDMA list
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org"
<ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org>
Subject: Re: [ofw] [Patch] [Tools][infiniband-diags]
Date: Sun, 1 Aug 2010 20:19:38 +0300 [thread overview]
Message-ID: <20100801171938.GB26625@me> (raw)
In-Reply-To: <E113D394D7C5DB4F8FF691FA7EE9DB443B390460E6-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
On 14:36 Wed 28 Jul , Irena Kruchkovsky wrote:
> A patch that fixes the GUID output in ibstat to work correctly in windows 2003.
>
> Index: D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c
> ===================================================================
> --- D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6199)
> +++ D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6200)
> @@ -72,9 +72,9 @@
> printf("\tNumber of ports: %d\n", ca->numports);
> printf("\tFirmware version: %s\n", ca->fw_ver);
> printf("\tHardware version: %s\n", ca->hw_ver);
> - printf("\tNode GUID: 0x%016llx\n",
> + printf("\tNode GUID: 0x%016I64x\n",
Normally we are using PRI* macros with management code. What about this:
diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c
index c44d8c4..525902d 100644
--- a/infiniband-diags/src/ibstat.c
+++ b/infiniband-diags/src/ibstat.c
@@ -72,10 +72,9 @@ static void ca_dump(umad_ca_t * ca)
printf("\tNumber of ports: %d\n", ca->numports);
printf("\tFirmware version: %s\n", ca->fw_ver);
printf("\tHardware version: %s\n", ca->hw_ver);
- printf("\tNode GUID: 0x%016llx\n",
- (long long unsigned)ntohll(ca->node_guid));
- printf("\tSystem image GUID: 0x%016llx\n",
- (long long unsigned)ntohll(ca->system_guid));
+ printf("\tNode GUID: 0x%016" PRIx64 "\n", ntohll(ca->node_guid));
+ printf("\tSystem image GUID: 0x%016" PRIx64 "\n",
+ ntohll(ca->system_guid));
}
static char *port_state_str[] = {
@@ -122,8 +121,7 @@ static int port_dump(umad_port_t * port, int alone)
printf("%sLMC: %d\n", pre, port->lmc);
printf("%sSM lid: %d\n", pre, port->sm_lid);
printf("%sCapability mask: 0x%08x\n", pre, ntohl(port->capmask));
- printf("%sPort GUID: 0x%016llx\n", pre,
- (long long unsigned)ntohll(port->port_guid));
+ printf("%sPort GUID: 0x%016" PRIx64 "\n", pre, ntohll(port->port_guid));
printf("%sLink layer: %s\n", pre, port->link_layer);
return 0;
}
? Does it solve an issue as well?
Sasha
--
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
next prev parent reply other threads:[~2010-08-01 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 11:36 [Patch] [Tools][infiniband-diags] Irena Kruchkovsky
[not found] ` <E113D394D7C5DB4F8FF691FA7EE9DB443B390460E6-WQlSmcKwN8Te+A/uUDamNg@public.gmane.org>
2010-08-01 17:19 ` Sasha Khapyorsky [this message]
2010-08-25 17:20 ` [ofw] " Sasha Khapyorsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100801171938.GB26625@me \
--to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
--cc=irena-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox