libsysfs: accept sysmlinks to directories instead of real directories
Recent changes to the sysfs layout introduced class-devices pointed to by a symlink, instead of the real object at that location. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
@@ -233,7 +233,7 @@ int sysfs_path_is_dir(const char *path)
|
||||
errno = EINVAL;
|
||||
return 1;
|
||||
}
|
||||
if ((lstat(path, &astats)) != 0) {
|
||||
if ((stat(path, &astats)) != 0) {
|
||||
dprintf("stat() failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user