git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal: fix plugin directory scan to be filesystem agnostic
[dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_options.c
diff --git
a/lib/librte_eal/common/eal_common_options.c
b/lib/librte_eal/common/eal_common_options.c
index
a199093
..
29942ea
100644
(file)
--- a/
lib/librte_eal/common/eal_common_options.c
+++ b/
lib/librte_eal/common/eal_common_options.c
@@
-191,12
+191,14
@@
eal_plugindir_init(const char *path)
}
while ((dent = readdir(d)) != NULL) {
}
while ((dent = readdir(d)) != NULL) {
- if (dent->d_type != DT_REG && dent->d_type != DT_LNK)
- continue;
+ struct stat sb;
snprintf(sopath, PATH_MAX-1, "%s/%s", path, dent->d_name);
sopath[PATH_MAX-1] = 0;
snprintf(sopath, PATH_MAX-1, "%s/%s", path, dent->d_name);
sopath[PATH_MAX-1] = 0;
+ if (!(stat(sopath, &sb) == 0 && S_ISREG(sb.st_mode)))
+ continue;
+
if (eal_plugin_add(sopath) == -1)
break;
}
if (eal_plugin_add(sopath) == -1)
break;
}