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:
Kay Sievers
2005-10-19 23:59:54 +02:00
parent 586e1a37ef
commit daff48063e
+1 -1
View File
@@ -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;
}