[ofw] [PATCH 7/8] [ib-diags] smpdump: add support for WinOF

Sean Hefty sean.hefty at intel.com
Tue Feb 17 14:36:20 PST 2009


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

diff --git a/infiniband-diags/src/smpdump.c b/infiniband-diags/src/smpdump.c
index 8618121..6c7f84c 100644
--- a/infiniband-diags/src/smpdump.c
+++ b/infiniband-diags/src/smpdump.c
@@ -102,7 +102,7 @@ drsmp_get_init(void *umad, DRPath *path, int attr, int mod)
 	if (path)
 		memcpy(smp->initial_path, path->path, path->hop_cnt+1);
 
-	smp->hop_cnt = path->hop_cnt;
+	smp->hop_cnt = (uint8_t) path->hop_cnt;
 }
 
 void
@@ -146,7 +146,7 @@ drsmp_set_init(void *umad, DRPath *path, int attr, int mod, void *data)
 	if (data)
 		memcpy(smp->data, data, sizeof smp->data);
 
-	smp->hop_cnt = path->hop_cnt;
+	smp->hop_cnt = (uint8_t) path->hop_cnt;
 }
 
 char *
@@ -172,7 +172,7 @@ str2DRPath(char *str, DRPath *path)
 	while (str && *str) {
 		if ((s = strchr(str, ',')))
 			*s = 0;
-		path->path[++path->hop_cnt] = atoi(str);
+		path->path[++path->hop_cnt] = (char) atoi(str);
 		if (!s)
 			break;
 		str = s+1;
@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
 
 	const struct ibdiag_opt opts[] = {
 		{ "sring", 's', 0, NULL, ""},
-		{ }
+		{ 0 }
 	};
 	char usage_args[] = "<dlid|dr_path> <attr> [mod]";
 	const char *usage_examples[] = {






More information about the ofw mailing list