]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Don't lose devices when multiple RDMA devices are present
authorSteve Wise <swise@opengridcomputing.com>
Thu, 11 Jan 2007 21:30:33 +0000 (13:30 -0800)
committerRoland Dreier <rolandd@cisco.com>
Thu, 11 Jan 2007 21:30:33 +0000 (13:30 -0800)
When scanning through /sys/class/infiniband_verbs, link structs into
the list of found devices properly so that older devices aren't lost.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/init.c

index 8fbfeb6e31b0b195f33f6ce5690124a0c56300c4..3b5fc89d491f7bb24e4c6fa937438f14857741aa 100644 (file)
@@ -134,7 +134,7 @@ static void find_sysfs_devs(void)
                         "%s/class/infiniband/%s", ibv_get_sysfs_path(),
                         sysfs_dev->ibdev_name);
 
-               sysfs_dev->next        = NULL;
+               sysfs_dev->next        = sysfs_dev_list;
                sysfs_dev->have_driver = 0;
                if (ibv_read_sysfs_file(sysfs_dev->sysfs_path, "abi_version",
                                        value, sizeof value) > 0)