get_file_type() should use stat(), not lstat()
authorJens Axboe <jens.axboe@oracle.com>
Sat, 6 Feb 2010 22:36:26 +0000 (23:36 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 6 Feb 2010 22:36:26 +0000 (23:36 +0100)
We care about the device, not the potential link we are passed.

Reported-by: "H. Tolley" <h_tolley@hotmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index cbef672e673e6d3c1d0d363466b677702e1953f1..c188981356a2cb022e9037d84c8f6f01d9c33a6c 100644 (file)
@@ -770,7 +770,7 @@ static void get_file_type(struct fio_file *f)
        else
                f->filetype = FIO_TYPE_FILE;
 
-       if (!lstat(f->file_name, &sb)) {
+       if (!stat(f->file_name, &sb)) {
                if (S_ISBLK(sb.st_mode))
                        f->filetype = FIO_TYPE_BD;
                else if (S_ISCHR(sb.st_mode))