[openib-general] [PATCH] devinfo multiple device support

Michael S. Tsirkin mst at mellanox.co.il
Mon Jan 23 07:23:52 PST 2006


For devinfo, it makes sense to report all available devices
if the user did not specify a specific one.

---

Make ibv_devinfo list all IB devices, rather than the first device, by default.

Signed-off-by: Dotan Barak <dotanb at mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: last_stable/src/userspace/libibverbs/examples/devinfo.c
===================================================================
--- last_stable.orig/src/userspace/libibverbs/examples/devinfo.c	2006-01-22 13:19:22.000000000 +0200
+++ last_stable/src/userspace/libibverbs/examples/devinfo.c	2006-01-22 13:18:23.000000000 +0200
@@ -403,7 +403,10 @@
 			fprintf(stderr, "No IB devices found\n");
 			return -1;
 		}
-		ret |= print_hca_cap(*dev_list, ib_port);
+		while (*dev_list) {
+				ret |= print_hca_cap(*dev_list, ib_port);
+				++dev_list;
+		}
 	}
 
 	if (ib_devname)

-- 
MST



More information about the general mailing list