[ofw] [PATCH 5/8] [ib-diag] ibportstate: add support for WinOF

Sean Hefty sean.hefty at intel.com
Tue Feb 17 14:33:09 PST 2009


Allow ibportstate to build and run on both Linux and Windows.  Window
build files are maintained in the WinOF respository.  These changes
allow dropping the infiniband-diags into the WinOF build environment.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---

 infiniband-diags/src/ibportstate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/infiniband-diags/src/ibportstate.c b/infiniband-diags/src/ibportstate.c
index d1a112b..c0b9b34 100644
--- a/infiniband-diags/src/ibportstate.c
+++ b/infiniband-diags/src/ibportstate.c
@@ -311,12 +311,12 @@ int main(int argc, char **argv)
 					/* Setup portid for peer port */
 					memcpy(&peerportid, &portid, sizeof(peerportid));
 					peerportid.drpath.cnt = 1;
-					peerportid.drpath.p[1] = portnum;
+					peerportid.drpath.p[1] = (uint8_t) portnum;
 
 					/* Set DrSLID to local lid */
 					if (ib_resolve_self(&selfportid, &selfport, 0) < 0)
 						IBERROR("could not resolve self");
-					peerportid.drpath.drslid = selfportid.lid;
+					peerportid.drpath.drslid = (uint16_t) selfportid.lid;
 					peerportid.drpath.drdlid = 0xffff;
 
 					/* Get peer port NodeInfo to obtain peer port number */






More information about the ofw mailing list