linux: slightly improve the old kernel detection code (r5668)
Don't abort the lookup entirely when it occurs.
Try the deprecated case too, just in case.
This commit was SVN r5670.
The following SVN revision numbers were found above:
r5668 -->
648b26a9d0ca38c5a1dea63d4410764f83c4a226
*/
err = lstat(path, &st);
if (err < 0 || !S_ISDIR(st.st_mode))
- return 0;
+ goto trydeprecated;
dir = opendir(path);
if (dir) {
}
}
+trydeprecated:
if (hwloc_linux_deprecated_classlinks_model != 0) {
/* deprecated sysfs: <device>/<class>:<name> */
dir = opendir(devicepath);