]> git.openfabrics.org - ~shefty/librdmacm.git/commit
librdmacm: Fail ucma_init if ibv_get_device_list is empty
authorYann Droneaud <ydroneaud@opteya.com>
Fri, 27 May 2011 17:59:50 +0000 (10:59 -0700)
committerSean Hefty <sean.hefty@intel.com>
Fri, 27 May 2011 17:59:50 +0000 (10:59 -0700)
commit6109a7f479eb5dfd00e1c6999d3bf9c4b1a8685a
treeafdfbe147361900d6d17309b557855496a2d908e
parentf8dae34ee7116e350fbbd1785d8a124d83f7d11f
librdmacm: Fail ucma_init if ibv_get_device_list is empty

From the ibv_get_device_list man page:

   ibv_get_device_list() returns the array of available RDMA devices, or
   sets errno and returns NULL if the request fails. If no devices are
   found then num_devices is set to 0, and non-NULL is returned.

The librdmacm handles the failure case, but not the case where no
devices are found.  Handle that case as well.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/cma.c