]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
r9105: Older versions of Linux do not have the misc device. Backport patches create
authorSean Hefty <sean.hefty@intel.com>
Thu, 24 Aug 2006 17:36:24 +0000 (17:36 +0000)
committerSean Hefty <sean.hefty@intel.com>
Thu, 24 Aug 2006 17:36:24 +0000 (17:36 +0000)
the RDMA CM abi_version file under /sys/class/infiniband_ucma, so we'll auto-
matically look there for the abi_version if we don't find it in its normal
location.

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

index 43d040c9d0a0e02beed2ee02bcbeeca4243ebfc7..ef15636e6f4d7a0f2e5f1f68265164d91e3bd9ae 100644 (file)
--- a/src/cma.c
+++ b/src/cma.c
@@ -141,9 +141,12 @@ static int check_abi_version(void)
 {
        char value[8];
 
-       if (ibv_read_sysfs_file(ibv_get_sysfs_path(),
-                               "class/misc/rdma_cm/abi_version",
-                               value, sizeof value) < 0) {
+       if ((ibv_read_sysfs_file(ibv_get_sysfs_path(),
+                                "class/misc/rdma_cm/abi_version",
+                                value, sizeof value) < 0) &&
+           (ibv_read_sysfs_file(ibv_get_sysfs_path(),
+                                "class/infiniband_ucma/abi_version",
+                                value, sizeof value) < 0)) {
                /*
                 * Older version of Linux do not have class/misc.  To support
                 * backports, assume the most recent version of the ABI.  If