[ofa-general] [PATCH] Fixed capability mask problem in ibsim introduec by commit 722b6c6428c9e4921a81f4a6db2838bcee660bb7
Nicolas Morey Chaisemartin
nicolas.morey-chaisemartin at ext.bull.net
Fri Apr 17 07:17:31 PDT 2009
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin at ext.bull.net>
---
I don't know if compilation on WinOF is still working with this patch as I have no way to test it but it fixes the problem for Linux.
If it doesn't work anymore, ntohll result should be shift of 32 bits right (>>32) before being cast to unsigned.
infiniband-diags/src/ibstat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c
index 7985be1..99af9a8 100644
--- a/infiniband-diags/src/ibstat.c
+++ b/infiniband-diags/src/ibstat.c
@@ -111,7 +111,7 @@ port_dump(umad_port_t *port, int alone)
printf("%sBase lid: %d\n", pre, port->base_lid);
printf("%sLMC: %d\n", pre, port->lmc);
printf("%sSM lid: %d\n", pre, port->sm_lid);
- printf("%sCapability mask: 0x%08x\n", pre, (unsigned)ntohll(port->capmask));
+ printf("%sCapability mask: 0x%08x\n", pre, (unsigned)(ntohl((uint32_t)(port->capmask))));
printf("%sPort GUID: 0x%016llx\n", pre, (long long unsigned)ntohll(port->port_guid));
return 0;
}
--
1.6.2-rc2.GIT
More information about the general
mailing list