From daff48063eb2cb547d24a547684543ee991f0815 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 19 Oct 2005 23:59:54 +0200 Subject: 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 --- libsysfs/sysfs_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsysfs/sysfs_utils.c b/libsysfs/sysfs_utils.c index c5558a43a1..bd7f99ae15 100644 --- a/libsysfs/sysfs_utils.c +++ b/libsysfs/sysfs_utils.c @@ -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; } -- cgit v1.2.3-54-g00ecf