[ofa-general] [PATCH 8/8] [ib-diags] smpquery: add support for WinOF

Sean Hefty sean.hefty at intel.com
Tue Feb 17 14:37:28 PST 2009


Allow smpquery 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/smpquery.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/infiniband-diags/src/smpquery.c b/infiniband-diags/src/smpquery.c
index 44280e1..2d3d91b 100644
--- a/infiniband-diags/src/smpquery.c
+++ b/infiniband-diags/src/smpquery.c
@@ -47,7 +47,7 @@
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <complib/cl_nodenamemap.h>
 
 #include "ibdiag_common.h"
 
@@ -191,7 +191,7 @@ pkey_table(ib_portid_t *dest, char **argv, int argc)
 	} else
 		mad_decode_field(data, IB_NODE_PARTITION_CAP_F, &n);
 
-	for (i = 0; i < (n + 31) / 32; i++) {
+	for (i = 0; i < (uint32_t) ((n + 31) / 32); i++) {
 		mod =  i | (portnum << 16);
 		if (!smp_query(data, dest, IB_ATTR_PKEY_TBL, mod, 0))
 			return "pkey table query failed";
@@ -353,7 +353,7 @@ guid_info(ib_portid_t *dest, char **argv, int argc)
 		return "port info failed";
 	mad_decode_field(data, IB_PORT_GUID_CAP_F, &n);
 
-	for (i = 0; i < (n + 7) / 8; i++) {
+	for (i = 0; i < (uint32_t) ((n + 7) / 8); i++) {
 		mod =  i;
 		if (!smp_query(data, dest, IB_ATTR_GUID_INFO, mod, 0))
 			return "guid info query failed";
@@ -412,7 +412,7 @@ int main(int argc, char **argv)
 	const struct ibdiag_opt opts[] = {
 		{ "combined", 'c', 0, NULL, "use Combined route address argument"},
 		{ "node-name-map", 1, 1, "<file>", "node name map file"},
-		{}
+		{ 0 }
 	};
 	const char *usage_examples[] = {
 		"portinfo 3 1\t\t\t\t# portinfo by lid, with port modifier",






More information about the general mailing list