From: Roland Dreier Date: Wed, 14 Dec 2005 20:44:36 +0000 (+0000) Subject: r4466: Change libibverbs API for listing all known devices from X-Git-Tag: v1.0-rc1~17 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=dd452d52ebc46ea3bbe8bfbbd19c31160f0c4041;p=~shefty%2Flibibcm.git r4466: Change libibverbs API for listing all known devices from ibv_get_devices() to ibv_get_device_list(), and update all in-tree uses of this API. Signed-off-by: Roland Dreier --- diff --git a/configure.in b/configure.in index aa80946..0dff705 100644 --- a/configure.in +++ b/configure.in @@ -25,8 +25,8 @@ AC_CHECK_SIZEOF(long) dnl Checks for libraries if test "$disable_libcheck" != "yes" then -AC_CHECK_LIB(ibverbs, ibv_get_devices, [], - AC_MSG_ERROR([ibv_get_devices() not found. libibcm requires libibverbs.])) +AC_CHECK_LIB(ibverbs, ibv_get_device_list, [], + AC_MSG_ERROR([ibv_get_device_list() not found. libibcm requires libibverbs.])) #AC_CHECK_LIB(rdmacm, rdma_create_id, [], # AC_MSG_ERROR([rdma_create_id() not found. ucmpost requires librdmacm.])) fi diff --git a/examples/cmpost.c b/examples/cmpost.c index ce3a7ba..5fa3f89 100644 --- a/examples/cmpost.c +++ b/examples/cmpost.c @@ -423,15 +423,14 @@ static void destroy_messages(void) static int init(void) { - struct dlist *dev_list; + struct ibv_device **dev_list; int ret; test.connects_left = connections; test.disconnects_left = connections; - dev_list = ibv_get_devices(); - dlist_start(dev_list); - test.device = dlist_next(dev_list); + dev_list = ibv_get_device_list(NULL); + test.device = dev_list[0]; if (!test.device) return -1;