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 <[EMAIL PROTECTED]>
Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

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
_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to