Message ID | 83fbc732-22e9-25ee-6e25-f3b80dff79ba@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Ira Weiny |
Headers | show |
diff --git a/umad2sim/umad2sim.c b/umad2sim/umad2sim.c index 90b1c73..84ab84f 100644 --- a/umad2sim/umad2sim.c +++ b/umad2sim/umad2sim.c @@ -737,6 +737,12 @@ int scandir(const char *path, struct dirent ***namelist, char new_path[4096]; CHECK_INIT(); + + if (!umad2sim_initialized && (is_sysfs_file(path) || + !strncmp(path, umad_dev_dir, + strlen(umad_dev_dir)))) + umad2sim_init(); + DEBUG("libs_wrap: scandir: %s...\n", path); if (is_sysfs_file(path)) {