[PATCH] Use lstat() instead of stat() in sysfs lookup
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 4cc3b7e92fbe802d80cc10f5baee9d4babfb0dee..7f38d96da7093d90c1af1eac5d51d0b3b6777bfa 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -156,8 +156,6 @@ static int find_block_dir(dev_t dev, char *path)
 
                if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
                        continue;
-               if (!strcmp(dir->d_name, "device"))
-                       continue;
 
                sprintf(full_path, "%s/%s", path, dir->d_name);
 
@@ -168,7 +166,7 @@ static int find_block_dir(dev_t dev, char *path)
                        }
                }
 
-               if (stat(full_path, &st) == -1) {
+               if (lstat(full_path, &st) == -1) {
                        perror("stat");
                        break;
                }