From: Sean Hefty Date: Thu, 24 Aug 2006 17:36:24 +0000 (+0000) Subject: r9105: Older versions of Linux do not have the misc device. Backport patches create X-Git-Tag: v1.0-rc1~19 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=491fb2d93d665da26431515be659630c690e4c4a;p=~shefty%2Flibrdmacm.git r9105: Older versions of Linux do not have the misc device. Backport patches create 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 --- diff --git a/src/cma.c b/src/cma.c index 43d040c9..ef15636e 100644 --- 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